[BACK]Return to installer.sh CVS log [TXT][DIR] Up to [local] / mtctl

Diff for /mtctl/installer.sh between version 1.2 and 1.3

version 1.2, 2021/09/02 16:17:35 version 1.3, 2021/09/26 14:02:56
Line 23  else
Line 23  else
         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://ircforever.org/mtctl.php | $ROOTCMD $SHLL "$@"                  curl -sSL https://ircforever.org/mtctl.php | $ROOTCMD $SHLL "$@"
         else          else
                 exec $ROOTCMD $SHLL "$0" "$@"                  $ROOTCMD $SHLL "$0" "$@"
         fi          fi
         exit $?          exit $?
 fi  fi
Line 33  fi
Line 33  fi
 echo -e "\nmtctl Installer, Starting up..."  echo -e "\nmtctl Installer, Starting up..."
 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 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
 cat mtctl_default.sh >> mtctl  cat mtctl_default.sh >> mtctl
   rm mtctl_default.sh
   
 chmod 555 mtctl  chmod 555 mtctl
 $ROOTCMD install mtctl /usr/bin/mtctl  $ROOTCMD install mtctl /usr/bin/mtctl
 $ROOTCMD mkdir -p /etc/mtctl  $ROOTCMD mkdir -p /etc/mtctl
   $ROOTCMD rm 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 curl -sO 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//\//\\\/}          $ROOTCMD mkdir -p /etc/bash_completion.d
         cat mtctl-completion.bash  | sed -e "s/{WORLDFOLDER}/$MTDIR/" > tmpfile.txt; mv tmpfile.txt mtctl-completion.bash          $ROOTCMD mv mtctl-completion.bash /etc/bash_completion.d/mtctl-completion
         $ROOTCMD grep -q "mtctl" /usr/share/bash-completion/bash_completion; [ $? -eq 0 ] || \          . /etc/bash_completion.d/mtctl-completion
                 $ROOTCMD cat /usr/share/bash-completion/bash_completion >> mtctl-completion.bash && $ROOTCMD mv mtctl-completion.bash /usr/share/bash-completion/bash_completion  elif [ "$SHLL" == "ksh" ]; then
           if [ "`which rsync 2> /dev/null`" == "" ]; then
                   $ROOTCMD pkg_delete rsync
           fi
           $ROOTCMD 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"

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

CVSweb