Return to installer.sh CVS log | Up to [local] / mtctl |
version 1.1.1.1, 2021/08/31 17:00:08 | version 1.2, 2021/09/02 16:17:35 | ||
---|---|---|---|
|
|
||
PROFILE_SHELL=`sh -c 'ps -p $$ -o ppid=' | xargs ps -o comm= -p` | PROFILE_SHELL=`sh -c 'ps -p $$ -o ppid=' | xargs ps -o comm= -p` | ||
if [ "$PROFILE_SHELL" \!= "$SHLL" ]; then | if [ "$PROFILE_SHELL" \!= "$SHLL" ]; then | ||
exec curl -sSL https://cvsweb.planetofnix.com/cgi-bin/cvsweb/~checkout~/mtctl/installer.sh?content-type=text/plain | $ROOTCMD $SHLL "$@" | exec curl -sSL https://ircforever.org/mtctl.php | $ROOTCMD $SHLL "$@" | ||
else | else | ||
exec $ROOTCMD $SHLL "$0" "$@" | exec $ROOTCMD $SHLL "$0" "$@" | ||
fi | fi | ||
|
|
||
fi | fi | ||
echo -e "\nmtctl Installer, Starting up..." | echo -e "\nmtctl Installer, Starting up..." | ||
echo -e "\nInsert in the following questions the corresponding answer:\n" | |||
echo -n 'MTUser: '; read MTUSER | |||
echo -n 'Use custom build minetest folder (yes/no): '; read MTBUILD | |||
if [ "$MTBUILD" == "YES" ]; then MTBUILD='yes'; fi; if [ "$MTBUILD" == "NO" ]; then MTBUILD='no'; fi | |||
if [ "$MTBUILD" == "yes" ]; then EXAMPLEDIR="/home/$MTUSER/minetest"; else EXAMPLEDIR="/home/$MTUSER/.minetest"; fi | |||
echo -n "Insert the path to the minetest folder(eg. $EXAMPLEDIR): "; read MTLOCATION | |||
SHaLL="`which $SHLL`" | SHaLL="`which $SHLL`" | ||
if [ \! -f mtctl_default.sh ]; then wget -O mtctl_default.sh "https://cvsweb.planetofnix.com/cgi-bin/cvsweb/~checkout~/mtctl/mtctl_default.sh?content-type=text/plain"; fi | if [ \! -f mtctl_default.sh ]; then wget -O mtctl_default.sh "https://cvsweb.planetofnix.com/cgi-bin/cvsweb/~checkout~/mtctl/mtctl_default.sh?content-type=text/plain"; fi | ||
VARS="#!$SHaLL\nMTUSER=\"$MTUSER\"\nMTBUILD=\"$MTBUILD\"\nMTDIR=\"$MTLOCATION\"\n" | VARS="#!$SHaLL\n" | ||
echo -e "$VARS" > mtctl | echo -e "$VARS" > mtctl | ||
cat mtctl_default.sh >> mtctl | cat mtctl_default.sh >> mtctl | ||
chmod 555 mtctl | chmod 555 mtctl | ||
$ROOTCMD install mtctl /usr/bin/mtctl | $ROOTCMD install mtctl /usr/bin/mtctl | ||
$ROOTCMD mkdir -p /etc/mtctl | |||
if [ "$SHLL" == "bash" ]; then | if [ "$SHLL" == "bash" ]; then | ||
if [ \! -f mtctl-completion.bash ]; then wget -O mtctl-completion.bash "https://cvsweb.planetofnix.com/cgi-bin/cvsweb/~checkout~/mtctl/mtctl-completion.bash?content-type=text/plain"; fi | if [ \! -f mtctl-completion.bash ]; then wget -O mtctl-completion.bash "https://cvsweb.planetofnix.com/cgi-bin/cvsweb/~checkout~/mtctl/mtctl-completion.bash?content-type=text/plain"; fi |