Skip to content

Instantly share code, notes, and snippets.

@pirogoeth
Created January 12, 2011 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pirogoeth/776464 to your computer and use it in GitHub Desktop.
Save pirogoeth/776464 to your computer and use it in GitHub Desktop.
generates a global.tcl file to load eggtcl scripts simply.
#!/usr/bin/env bash
#global.tcl generator
# variables
select_list="Yes No"
if test -e ./global.tcl ; then
echo "Remove global.tcl?"
select choice in $select_list
do
case $choice in
Yes)
rm ./global.tcl
break
;;
No)
break
;;
esac
done
fi
for item in $(ls)
do
if test -d $item ; then
directories="$directories $item"
fi
done
for directory in $directories
do
directory_items=$(ls $directory/*.tcl)
for item in $directory_items
do
echo "Enable $item?"
select choice in $select_list
do
case choice in
Yes)
echo "source scripts/egg/$directory/$item"
break
;;
No)
break
;;
esac
break
done
done
done
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment