Skip to content

Commit

Permalink
Fixed permissions for multiuser setups & added version mode '-v'
Browse files Browse the repository at this point in the history
  • Loading branch information
Darius Musiolik authored and Darius Musiolik committed Nov 6, 2018
1 parent 9475b4e commit 9cb87b3
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions get-waterfox
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
#! /bin/bash

version="1.2"

#Check if Parameters are set
if [ "$1" = "" ] || [ "$1" = "-h" ]; then
echo "Welcome to get-waterfox 1.0!"
echo ""
echo "Usage:"
echo ""
echo "Create Waterfox dir:"
echo "# get-waterfox init"
echo "# get-waterfox init >>> First init to create env"
echo ""
echo "First installation"
echo "$ get-waterfox download"
echo "# get-waterfox install"
echo "$ get-waterfox download >>> Download the current Waterfox Tarball"
echo "# get-waterfox install >>> Install the Waterfox Tarball & create all links etc"
echo ""
echo "General commands"
echo "# get-waterfox update"
echo "$ get-waterfox cleanup"
echo "# get-waterfox update >>> Update Waterfox"
echo "$ get-waterfox cleanup >>> Delete old waterfox tarball"
echo "$ get-waterfox -v >>> Print version of get-waterfox"
echo ""
echo "Remove Waterfox"
echo "# get-waterfox remove"
echo "# get-waterfox remove >>> Remove Waterfox complete"
echo ""
echo "Use '-h' to show this help"
echo "Please run the commands this way: init; download; install"
Expand All @@ -35,13 +38,13 @@ if [ "$EUID" != "0" ]; then
mkdir /usr/share/waterfox
echo "[INIT] Creating data folder /usr/share/waterfox"
mkdir /usr/share/waterfox-data
echo "[INIT] Alter rights in working & data dir's to 776"
chmod 776 /usr/share/waterfox --recursive
chmod 776 /usr/share/waterfox-data --recursive
echo "[INIT] Alter rights in working & data dir"
chmod 777 /usr/share/waterfox/ --recursive
chmod 777 /usr/share/waterfox-data/ --recursive
echo "[INIT] Creating localversion file"
touch /usr/share/waterfox-data/localversion
echo "[INIT] Alter rights for localversion file to 776"
chmod 776 /usr/share/waterfox-data/localversion
echo "[INIT] Alter rights for localversion file"
chmod 777 /usr/share/waterfox-data/localversion
exit
fi

Expand Down Expand Up @@ -175,6 +178,12 @@ if [ "$1" = "cleanup" ]; then
exit
fi

#Version
if [ "$1" = "-v" ]; then
echo "get-waterfox $version"
exit
fi


#Unkown Input
echo "Can't understand, plsease use -h for help"

0 comments on commit 9cb87b3

Please sign in to comment.