Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #!/bin/bash
  2. RED='\033[0;31m'
  3. PROJECT_NAME=$1
  4. PROJECTS_REPOSITORY_FILE_FULL_PATH="/path/to/saveproj/output/file"
  5. PROJECTS_FOLDER_FULL_PATH="/path/to/your/projects/folder"
  6. if ! line=$(grep "\<$PROJECT_NAME\>" $PROJECTS_REPOSITORY_FILE_FULL_PATH)
  7. then
  8. echo -e "${RED}$PROJECT_NAME not found in projects list. You can create one by using the saveproj tool."
  9. else
  10. directory_name=${line##* }
  11. cd "${PROJECTS_FOLDER_FULL_PATH}${directory_name}"
  12. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement