Change-Id: I4505f0e6c935a94ebd4a869e39455fe6ff10b91c
;;
esac
-if [ ! -d $version ]; then
- echo "Version directory '$version' does not exist yet. Please run the 'clone' action first."
- exit -1
+if [ -n "$version" ] && [ -d $version ]; then
+ pushd $version > /dev/null
fi
-pushd $version > /dev/null
case "$action" in
branch)
for (( i=0; i<${repositoryCount}; i++ )); do
;;
*)
echo "Usage: ${self} <version> <branch-name> <user-name> clone|branch|checkout|fetch|list-tags|pull|push|push-tags|remove-tag|status|tag"
+ if [ -d $version ]; then
+ echo "Version directory ('$version') does not exist yet. Please run the 'clone' action first."
+ fi
;;
esac