Only cherry-pick if really there is something to do.
[jprojects-scripts.git] / bundle-jprojects.sh
1 #!/bin/bash
2
3 . ./.jprojects.sh || exit 255
4
5 for project in ${LIST}; do
6         if [ "${project}" = "jprojects-scripts" ]
7         then
8                 echo "$0: Skipping jprojects-scripts ..."
9                 continue
10         elif [ ! -d "${JPROJECTS_HOME}/${project}" ]
11         then
12                 echo "$0: Project '${project}' does not exist."
13                 continue
14         fi
15
16         BUNDLE_FILE="${JPROJECTS_HOME}/${project}.bundle"
17
18         echo "$0: Bundling '${project}' ..."
19         cd "${JPROJECTS_HOME}/${project}"
20         git bundle create "${BUNDLE_FILE}" HEAD
21 done
22
23 echo "$0: All done."
24 exit 0