Sha256: 4b3460f04ab9d0bdad50cb48fc96e19fda3c2fe7d708c99704b0d31993ff503b

Contents?: true

Size: 891 Bytes

Versions: 3

Compression:

Stored size: 891 Bytes

Contents

#!/bin/bash

# Author: A. Iurlano

# run this as normal user, with bash shell

GZNAME=`curl -s https://developers.google.com/compute/docs/gcutil/  | grep -o 'https://code.google.com/p/google-compute-engine-tools/downloads/detail?name=gcutil-[^"]*.tar.gz'| grep -o 'gcutil.*'`

GCURL='https://google-compute-engine-tools.googlecode.com/files/'${GZNAME}

#echo ${GCURL} 
#echo ${GZNAME}

cd /usr/local/

sudo -E wget -c ${GCURL} -O ${GZNAME}

sudo tar zxvf ${GZNAME}

export FOLDERNAME=${GZNAME:0:$((${#GZNAME}-7))}

sudo rm -f /usr/local/gcutil
sudo ln -sf /usr/local/${FOLDERNAME} /usr/local/gcutil

#check if it was added to the path
grep -q '/usr/local/gcutil' ~/.bashrc 
if [ $? -ne 0 ]; then
  cat <<EOF >> ~/.bashrc

export PATH=/usr/local/gcutil:\${PATH}

EOF
  echo "Warning: Your .bashrc file was modified."
  echo "         Remember to do . ~/.bashrc or logout and log back in"
fi

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sakuric-2.1.3 bin/gcutil-fetch
sakuric-2.0.3 bin/gcutil-fetch
sakuric-2.0.1 bin/gcutil-fetch