add-project 290 B

1234567891011121314
  1. #!/bin/bash
  2. if [[ "$1" != "" ]];then
  3. if [[ "$2" != "" ]];then
  4. mkdir -p src/$1;
  5. ln -s `readlink -f $2` src/$1/src;
  6. echo "Linked source in $2";
  7. else
  8. mkdir -p src/$1/src;
  9. fi;
  10. touch src/$1/build.sh
  11. echo "Created project $1";
  12. else
  13. echo "Usage: $0 <projectname> [<sourcedir>]";
  14. fi;