=================================================================== RCS file: /cvs/mtctl/installer.sh,v retrieving revision 1.1.1.2 retrieving revision 1.5 diff -u -p -r1.1.1.2 -r1.5 --- mtctl/installer.sh 2021/08/31 17:01:08 1.1.1.2 +++ mtctl/installer.sh 2022/11/22 11:28:03 1.5 @@ -23,9 +23,9 @@ else PROFILE_SHELL=`sh -c 'ps -p $$ -o ppid=' | xargs ps -o comm= -p` 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 "$@" + curl -sSL https://ircforever.org/mtctl.php | $ROOTCMD $SHLL "$@" else - exec $ROOTCMD $SHLL "$0" "$@" + $ROOTCMD $SHLL "$0" "$@" fi exit $? fi @@ -33,22 +33,29 @@ fi echo -e "\nmtctl Installer, Starting up..." 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 curl -so mtctl_default.sh "https://cvsweb.planetofnix.com/cgi-bin/cvsweb/~checkout~/mtctl/mtctl_default.sh?content-type=text/plain"; fi VARS="#!$SHaLL\n" echo -e "$VARS" > mtctl cat mtctl_default.sh >> mtctl +rm mtctl_default.sh chmod 555 mtctl -$ROOTCMD install mtctl /usr/bin/mtctl -$ROOTCMD mkdir -p /etc/mtctl +install mtctl /usr/bin/mtctl +mkdir -p /etc/mtctl +rm mtctl 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 - MTDIR="$MTLOCATION/worlds"; MTDIR=${MTDIR//\//\\\/} - cat mtctl-completion.bash | sed -e "s/{WORLDFOLDER}/$MTDIR/" > tmpfile.txt; mv tmpfile.txt mtctl-completion.bash - $ROOTCMD grep -q "mtctl" /usr/share/bash-completion/bash_completion; [ $? -eq 0 ] || \ - $ROOTCMD cat /usr/share/bash-completion/bash_completion >> mtctl-completion.bash && $ROOTCMD mv mtctl-completion.bash /usr/share/bash-completion/bash_completion + apt-get install rsync + if [ \! -f mtctl-completion.bash ]; then curl -so mtctl-completion.bash "https://cvsweb.planetofnix.com/cgi-bin/cvsweb/~checkout~/mtctl/mtctl-completion.bash?content-type=text/plain"; fi + mkdir -p /etc/bash_completion.d + mv mtctl-completion.bash /etc/bash_completion.d/mtctl-completion + . /etc/bash_completion.d/mtctl-completion +elif [ "$SHLL" == "ksh" ]; then + if [ "`which rsync 2> /dev/null`" == "" ]; then + pkg_delete rsync + fi + pkg_add rsync-- fi echo -e "Done!\n\nThanks for installing mtctl!\nYou can now use it by running $ mtctl"