strolch/li.strolch.dev/push.sh

29 lines
466 B
Bash
Raw Normal View History

2013-10-27 03:49:34 +01:00
#!/bin/bash
projectsFile="${PWD}/projects.lst"
cd ..
while read project; do
if [ "${project}" == "" ] ; then
continue;
fi
array=(${project//:/ })
name="${array[0]}"
tag="${array[1]}"
if [ "${name}" == "" ] || [ "${tag}" == "" ] ; then
echo -e "ERROR: Invalid project: ${project}! Must have form <git_name:tag>"
exit 1
fi
echo "== Pushing ${name}..."
cd ${name}
git push
cd ..
echo
done < ${projectsFile}
2013-10-27 03:49:34 +01:00
echo "Done."
exit 0