Update publish scripts

This commit is contained in:
Andrew Miner
2015-05-13 11:12:48 -07:00
parent a545628e04
commit 4abc879600
6 changed files with 65 additions and 60 deletions
Executable
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
USAGE=<<END
USAGE: all <command>
Executes a command for this project and each project related to this one.
Related projects must include this project's name as a prefix in their name
to be considered related.
END
COMMAND="$1"
[[ "$COMMAND" == "" ]] && echo $USAGE && exit 1
SRC_ROOT="/src"
BASE_NAME=$(basename $PWD)
pushd $SRC_ROOT &>/dev/null
for MODULE in $(ls | grep "$BASE_NAME"); do
cd "$SRC_ROOT/$MODULE"
if [[ -e './scripts/unpublished' ]]; then
./scripts/unpublished
fi
done
popd &>/dev/null