Skip to content

Commit

Permalink
improv: added uninstall script to installed files
Browse files Browse the repository at this point in the history
  • Loading branch information
BartSte committed Apr 10, 2024
1 parent d449d7d commit a8be1d9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,17 @@ install() {

makedir="mkdir -p $plugin_dir || abort"
copy="cp $this_dir/src/* $plugin_dir || abort"
copy_uninstall="cp $this_dir/uninstall $plugin_dir || abort"
if $root; then
echo "Installing as root"
eval "sudo $makedir"
eval "sudo $copy"
eval "sudo $copy_uninstall"
else
echo "Installing as user"
eval $makedir
eval $copy
eval "$makedir"
eval "$copy"
eval "$copy_uninstall"
fi

echo 'Installation complete.'
Expand Down

0 comments on commit a8be1d9

Please sign in to comment.