forked from rsmusllp/termineter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·47 lines (36 loc) · 952 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /bin/sh
# Termineter Framework Convenience Install Script
# Copies all of the necessary files to the proper directories
USAGE="Termineter Framework Convenience Installer
Usage:
install.sh [ path to install to ]
If a path is not specified /opt will be used."
if [ "$(id -u)" != "0" ]; then
echo "This Must Be Run As Root"
echo ""
echo "$USAGE"
exit 1
fi
if [ $# != 1 ]; then
INSTALLROOT="/opt"
else
INSTALLROOT="$1"
fi
if [ ! -d "$INSTALLROOT" ]; then
echo "Invalid Directory"
echo ""
echo "$USAGE"
exit 1
fi
EXEPATH="/usr/local/bin/termineter"
FRMWKBASE="$INSTALLROOT/termineter"
echo "Copying Files To: $FRMWKBASE"
if [ ! -d "$FRMWKBASE" ]; then
mkdir $FRMWKBASE
fi
cp -r * $FRMWKBASE
echo "#!/bin/sh" > $EXEPATH
echo "FRMWKBASE=$INSTALLROOT/termineter" >> $EXEPATH
echo "python -B \$FRMWKBASE/termineter.py \"\$@\"" >> $EXEPATH
chmod +x $EXEPATH
echo "Done, Thanks For Playing."