-
Notifications
You must be signed in to change notification settings - Fork 1
/
install
executable file
·26 lines (21 loc) · 854 Bytes
/
install
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
#!/bin/sh
set -e # crash on errors
# check if ~/.xprofile exists
if [ -f ~/.xprofile ]
then
echo "You already have a ~/.xprofile, appending to it."
echo "nohup python ~/cse-helpme/client/csehelp.py helper-daemon > /dev/null 2>&1&" >> ~/.xprofile;
else
echo "#!/bin/sh" > ~/.xprofile;
echo "nohup python ~/cse-helpme/client/csehelp.py helper-daemon > /dev/null 2>&1&" >> ~/.xprofile;
fi
chmod a+x ~/.xprofile
# add a symbolic link in ~/bin to csehelp.py
if [ ! -d ~/bin ]
then
mkdir ~/bin
fi
ln -s ~/cse-helpme/client/csehelp.py ~/bin/csehelp.py
nohup python ~/cse-helpme/client/csehelp.py helper-daemon > /dev/null 2>&1&
echo "**Successfully installed csehelpme daemon in ~/.xprofile - Please run the script with register to set yourself up as a helper";
echo "See https://github.com/stanleyhon/cse-helpme for more information";