From a077240ca38eed70e86b05e077a82c58a3f835cd Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Mon, 24 Feb 2014 08:00:33 -0500 Subject: [PATCH] adding a script to ease the installation of Dyrcona's evergreen utilities --- setup_evergreen_utilities.sh | 64 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 setup_evergreen_utilities.sh diff --git a/setup_evergreen_utilities.sh b/setup_evergreen_utilities.sh new file mode 100755 index 0000000..e4e43ad --- /dev/null +++ b/setup_evergreen_utilities.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +# A program to quickly download and configure Jason Stephenson's evergreen_utilities repo. + +EG_USER="admin" +EG_PASS="gamma4pines" +EG_WORKSTATION="STATELIB-L-csharp-desktop" +APT_TOOL="/usr/bin/apt-get" +GIT_USER="opensrf" +GIT_HOME="/home/$GIT_USER" +REPO_LIST="evergreen_utilities backstage JSONPrefs" +BIN_DIR="$GIT_HOME/bin" +LIB_DIR="$GIT_HOME/lib/perl" +PREFS_DIR="$GIT_HOME/myprefs.d" +DIR_LIST="$BIN_DIR $LIB_DIR $PREFS_DIR" +EXPORT_PATH="export PATH=$PATH:$BIN_DIR" +EXPORT_PERL5LIB="export PERL5LIB=$PERL5LIB:$LIBDIR" +read -d '' EG_JSON < $PREFS_DIR/evergreen.json" + +for line in $EXPORT_PATH $EXPORT_PERL5LIB; do + su - $GIT_USER -C "echo $line >> ~/.bashrc" +done; +echo "As the $GIT_USER user, please 'source ~/.bashrc' after this script is completed." -- 2.11.0