Author: biurrun Date: Thu Oct 8 17:36:46 2009 New Revision: 1063 Log: Replace weird bash-specific shell arithmetic by a simple function. This fixes the script to run under non-bash shells. Modified: trunk/tools/mount-lufg Modified: trunk/tools/mount-lufg ============================================================================== --- trunk/tools/mount-lufg Thu Oct 8 17:35:41 2009 (r1062) +++ trunk/tools/mount-lufg Thu Oct 8 17:36:46 2009 (r1063) @@ -32,16 +32,10 @@ stty echo - # Mount shares - - -SHARES=( //pride/$USER //pride/projects/pisa //pride/power/pisa ) -DIRS=( home project build ) - -for (( i = 0 ; i < ${#SHARES[@]} ; i++ )); do - SHARE=${SHARES[$i]} - DIR=${DIRS[$i]} +mount_share() { + SHARE=$1 + DIR=$2 if [ ! -d "$HOME/$DIR" ]; then echo "Directory $HOME/$DIR does not exist. Creating directory."; @@ -54,6 +48,8 @@ echo "Mounting $SHARE" smbmount $SHARE $HOME/$DIR -o user=$USER%$PASS -done - +} +mount_share //pride/$USER home +mount_share //pride/projects/pisa project +mount_share //pride/power/pisa build