Return to installer.sh CVS log | Up to [local] / mtctl |
version 1.3, 2021/09/26 14:02:56 | version 1.5, 2022/11/22 11:28:03 | ||
---|---|---|---|
|
|
||
echo -e "\nmtctl Installer, Starting up..." | echo -e "\nmtctl Installer, Starting up..." | ||
SHaLL="`which $SHLL`" | SHaLL="`which $SHLL`" | ||
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 | 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" | VARS="#!$SHaLL\n" | ||
echo -e "$VARS" > mtctl | echo -e "$VARS" > mtctl | ||
|
|
||
rm mtctl_default.sh | rm mtctl_default.sh | ||
chmod 555 mtctl | chmod 555 mtctl | ||
$ROOTCMD install mtctl /usr/bin/mtctl | install mtctl /usr/bin/mtctl | ||
$ROOTCMD mkdir -p /etc/mtctl | mkdir -p /etc/mtctl | ||
$ROOTCMD rm mtctl | rm mtctl | ||
if [ "$SHLL" == "bash" ]; then | if [ "$SHLL" == "bash" ]; then | ||
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 | apt-get install rsync | ||
$ROOTCMD mkdir -p /etc/bash_completion.d | 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 | ||
$ROOTCMD mv mtctl-completion.bash /etc/bash_completion.d/mtctl-completion | mkdir -p /etc/bash_completion.d | ||
mv mtctl-completion.bash /etc/bash_completion.d/mtctl-completion | |||
. /etc/bash_completion.d/mtctl-completion | . /etc/bash_completion.d/mtctl-completion | ||
elif [ "$SHLL" == "ksh" ]; then | elif [ "$SHLL" == "ksh" ]; then | ||
if [ "`which rsync 2> /dev/null`" == "" ]; then | if [ "`which rsync 2> /dev/null`" == "" ]; then | ||
$ROOTCMD pkg_delete rsync | pkg_delete rsync | ||
fi | fi | ||
$ROOTCMD pkg_add rsync-- | pkg_add rsync-- | ||
fi | fi | ||
echo -e "Done!\n\nThanks for installing mtctl!\nYou can now use it by running $ mtctl" | echo -e "Done!\n\nThanks for installing mtctl!\nYou can now use it by running $ mtctl" |