Skip to content

Commit

Permalink
build.sh: allow passing editor, not hardcode nano
Browse files Browse the repository at this point in the history
this allows to use different editor like this:

EDITOR=gedit ./build.sh dts

fallback is users default editor set by update-alternatives
  • Loading branch information
frank-w committed Aug 1, 2023
1 parent d35da1a commit 9f3361a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ fi
function edit()
{
file=$1
EDITOR=nano
if [[ -z "$EDITOR" ]];then EDITOR=/usr/bin/editor;fi #use alternatives setting
if [[ -e "$file" ]];then
if [[ -w "$file" ]];then
$EDITOR "$file"
Expand Down

0 comments on commit 9f3361a

Please sign in to comment.