github.com/epfl-dcsl/gotee@v0.0.0-20200909122901-014b35f5e5e9/install.sh (about)

     1  #!/bin/sh
     2  
     3  NAME="gotee"
     4  CURRENT=`pwd`
     5  FILE="_run.sh"
     6  
     7  #Creating the command file.
     8  if [ -f "$FILE" ]; then
     9  	rm -f $FILE
    10  fi
    11  
    12  echo "
    13  #!/bin/bash
    14  CURRENT=\"$CURRENT\"
    15  GOROOT=$CURRENT $CURRENT/bin/go \$@
    16  " > $FILE
    17  
    18  chmod +x $FILE
    19  
    20  # Installing command.
    21  echo "Installing cmd as $NAME"
    22  echo "........................."
    23  rm /usr/local/bin/$NAME
    24  ln -s $CURRENT/$FILE /usr/local/bin/$NAME
    25  echo "Done."
    26  which $NAME
    27  echo "........................."
    28  
    29