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
|
#!/bin/bash
#
# starts @progtitle@ from the installation directory
INSTALL=@prefix@/games/@progname@
if test ! -r $HOME/.@prognamebase@ ; then
mkdir $HOME/.@prognamebase@
if test -r $HOME/.ArmageTronrc ; then
#migrage very old configuration
echo "Porting very old configuration..."
mkdir $HOME/.@prognamebase@/var
mv $HOME/.ArmageTronrc $HOME/.@prognamebase@/var/user.cfg
fi
fi
if test ! -r $HOME/.@prognamebase@/var ; then
#migrate old configuration
files=$( find $HOME/.@prognamebase@ -type f -maxdepth 1 )
mkdir $HOME/.@prognamebase@/var
test "$files" != "" && echo "Porting old configuration..." && mv $files $HOME/.@prognamebase@/var
fi
if test "x$1" = "x-h" ; then
echo -e "\n\nTo uninstall @progtitle@, type @progname@ --uninstall."
fi
if test "x$1" = "x--uninstall" ; then
$INSTALL/bin/uninstall
else
$INSTALL/bin/@progname@ --datadir $INSTALL @configdir@ --userdatadir $HOME/.@prognamebase@ $*
fi
|