. ./.jprojects.sh || exit 255
+TARGETS="d t u"
+
+if [ "$1" = "a" ]
+then
+ cd "${JPROJECTS_HOME}"
+ for TARGET in ${TARGETS}; do
+ echo "$0: Pushing for target '${TARGET}' ..."
+ $0 "${TARGET}" "1"
+ done
+
+ echo "$0: Pushed to all targets."
+ exit 0
+fi
+
for ENTRY in ${LIST}; do
echo "$0: Pushing '${ENTRY}' ..."
- cd "${ENTRY}" || exit 255
- git push --all
- if [ "$1" = "u" ]
+ cd "${JPROJECTS_HOME}/${ENTRY}" || exit 255
+
+ if [ -z "$2" ]
then
- git push --all upstream
- elif [ "$1" = "d" ]
+ git push --all
+ fi
+
+ if [ "$1" = "d" ]
then
git push --all daedalus
+ elif [ "$1" = "t" ]
+ then
+ git push --all transport
+ elif [ "$1" = "u" ]
+ then
+ git push --all upstream
fi
- cd -
+ cd "${JPROJECTS_HOME}"
done