Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ if [[ $EUID -ne 0 ]]; then
exit 1
fi

# Make sure we're running in our git directory
if [ ! -d .git ]; then
echo "It doesn't seem we're running from the right place. Please make sure you are running from the brewpi-tools directory"
exit 1
fi

owner=$( stat -c "%U" . )
if [ "$owner" != "pi" ] && [ "$owner" != "brewpi" ]; then
echo "This script needs to run from either the pi or brewpi userspace- try moving these files to /home/pi and running again"
exit 1
fi

############
### Functions to catch/display errors during setup
############
Expand Down