changes
This commit is contained in:
parent
3025579b98
commit
3d9022dcc5
13
install.sh
13
install.sh
@ -1,20 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
GIT_REPO="https://git.willy.club/William/kvs-linuxmint-dloadx"
|
GIT_REPO="https://git.willy.club/William/kvs-linuxmint-dloadx"
|
||||||
GIT_NAME="kvs-linuxmint-dloadx" # Must not contain spaces and/or weird characters
|
GIT_NAME="kvs-linuxmint-dloadx" # Must not contain spaces and/or weird characters
|
||||||
#TARGET_DIR="/opt" #directory to install to
|
TARGET_DIR="/opt" #directory to install to
|
||||||
USERNAME=$(logname)
|
USERNAME=$(logname)
|
||||||
|
|
||||||
echo "What directory do you want to install to?"
|
|
||||||
echo "Specify directory below and files wil be copied in to a subdirectory of that directory called /$GIT_NAME"
|
|
||||||
echo "Default if nothing is entered is /opt"
|
|
||||||
|
|
||||||
#get user input
|
|
||||||
read TARGET_DIR
|
|
||||||
|
|
||||||
if [ $TARGET_DIR == "" ]; then #set directory to /opt if the user wrote nothing
|
|
||||||
TARGET_DIR="/opt"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $EUID -ne 0 ]]; then #make shure that script is being run as root
|
if [[ $EUID -ne 0 ]]; then #make shure that script is being run as root
|
||||||
echo "This script must be run as root."
|
echo "This script must be run as root."
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user