123456789101112131415161718192021222324252627282930313233343536373839 |
- #!/bin/bash
- # setup.sh - Setup Go development software.
- PATH_CURRENT=`pwd`
- SETUP_ENV_SCRIPT_NAME=setup.sh
- # Find out the path of the setup script
- if [ $0 == $SETUP_ENV_SCRIPT_NAME ]; then
- PATH_SETUP_SH="."
- else
- PATH_SETUP_SH=${0/%\/$SETUP_ENV_SCRIPT_NAME}
- fi
- cd $PATH_SETUP_SH/..
- # Root dir of env-go
- ROOT_PATH=`pwd`
- # Define the paths
- TARGET_PATH=$ROOT_PATH/linux
- SOURCE_PATH=$ROOT_PATH/setup/pkg/linux
- # Extract files in place
- rm -fR $TARGET_PATH
- mkdir -p $TARGET_PATH
- cd $TARGET_PATH
- for filename in $SOURCE_PATH/*; do
- echo ${filename}
- echo ${filename: -7}
- if [ ${filename: -7} == ".tar.gz" ]; then
- tar -xvzf ${filename}
- fi
- done
|