Skip to content

Commit

Permalink
Improve detection against rm -r / (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
alcayaga committed Apr 24, 2020
1 parent 4fa1533 commit 44c865e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions updater
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ if test -f "airupnp.service";
mode=Installing
echo "First Installation detected."
read -p "Enter full path where to install: " currdirectory

if test -z "$currdirectory"
then
# install to current path if nothing is entered
currdirectory=$PWD
fi

if [ "$currdirectory" = "/" ];
then
echo "Can't install at root"
exit 1
fi

mkdir $currdirectory
fi
tmpfolder=/tmp/AirConnect
Expand Down

0 comments on commit 44c865e

Please sign in to comment.