Question 4: Bash scripting [9]

Write a bash script implementing the following three functions:

  1. gitSetup course assignment (e.g. gitSetup csci265 phase1)
    gitSetup performs the fetch and clone for a student's git repository following the processes we have used for the various phases and quizzes this semester.

  2. gitCommit message
    When run in the root of a git repository, gitCommit performs a git add ., a git add -u, and git commit -m message
    Provides a suitable error message if run in a directory that is not the root of a git repository.

  3. gitPush message
    When run in the root of a git repository, gitPush checks out the master branch, performs a gitCommit message, and performs a push.