Improve edit script
This commit is contained in:
parent
19fdac4137
commit
b8dd204681
1 changed files with 2 additions and 0 deletions
|
@ -20,6 +20,8 @@ echo "Editing $1 in $filepath as $user:$group"
|
||||||
sudo test -e "$1" && (
|
sudo test -e "$1" && (
|
||||||
sudo cp -i "$1" "$filepath"
|
sudo cp -i "$1" "$filepath"
|
||||||
sudo chown "$user":"$group" "$filepath"
|
sudo chown "$user":"$group" "$filepath"
|
||||||
|
) || (
|
||||||
|
touch "$filepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
$EDITOR "$filepath"
|
$EDITOR "$filepath"
|
||||||
|
|
Loading…
Reference in a new issue