...
 
Commits (2)
......@@ -64,8 +64,8 @@ if [ -n "$FILES" ]; then
fi
fi
if [ -z "$DIR" ]; then
DIR=$(dirname "$i")
elif [ "$DIR" != "$(dirname "$i")" ]; then
DIR=$(dirname "$i" | cut -f1-2 -d/)
elif [ "$DIR" != "$(dirname "$i" | cut -f1-2 -d/)" ]; then
echo "Please don't commit in multiple directories"
ERROR="yes"
fi
......
......@@ -346,8 +346,10 @@ function review_commit
(cd "${REVIEW_GITREPO}"
sbolint -q "$catnamprgnam" || true
git add "$catnamprgnam"
[ -n $(git diff --name-only --cached | grep -v "^${catnamprgnam}/") ] \
&& { echo "${CMD}: Error: multiple SlackBuilds in staging" >&2; exit 1; }
if git diff --name-only --cached | grep -q -v "^${catnamprgnam}/"; then
echo "${CMD}: Error: multiple SlackBuilds in staging" >&2
exit 1
fi
)
. "${REVIEW_GITREPO}"/"$catnam"/"$prgnam"/"$prgnam".info
......