-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
49 lines (38 loc) · 1.17 KB
/
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
48
49
#!/bin/bash
# install tcltext
name=$(whoami)
echo "Installing Tickle Text..."
if [ ! $HOME/bin/ ];
# if you have no /home/you/bin, we make one to install tcltext in
then mkdir $HOME/bin
$PATH=$PATH:/$HOME/bin/
export PATH
fi
echo "Checking for configs, and setting them up if you don't have them..."
if [ ! $HOME/.tcltext ]
# checking for config dir, if none, we make it
then mkdir $HOME/.tcltext
fi
if [ ! $HOME/.tcltext/tcltext.conf ]
# also checking to see if you have a .conf file, perhaps from a previous version.
# we don't want to overwrite it, if you do, and lose your config
# but if you have none, we copy in the prefab, with dummy vars
then cp tcltext.conf $HOME/.tcltext/
fi
echo "Moving files"
cp tcltext.tcl $HOME/bin/tcltext
cp tdict.tcl $HOME/bin/tdict
cp ticklecal $HOME/bin/ticklecal
cp tcalcu.tcl $HOME/bin/tcalcu
cp tickletext.gif $HOME/.tcltext/tcltxt.gif
echo "Configuring permissions"
cd $HOME/bin
chmod +x tcltext
chmod +x tdict
chmod +x ticklecal
chmod +x tcalcu
echo "Installation complete!"
echo "Thank you for using TclText"
echo "To run TclText, in terminal type tcltext, or make an icon/menu item/short cut to $HOME/bin/tcltext"
echo "Enjoy!"
exit