Skip to content

Commit

Permalink
indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
svandragt committed Jun 6, 2020
1 parent 0b6a7cd commit 1e81cda
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions repoman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ INVOKE_DIR=${PWD}/
_export() {
while read -r d
do
pushd "$d/.." >/dev/null
PRJ_DIR=${PWD#"$INVOKE_DIR"}
REMOTE=$(git remote get-url origin 2>/dev/null)
popd >/dev/null
pushd "$d/.." >/dev/null
PRJ_DIR=${PWD#"$INVOKE_DIR"}
REMOTE=$(git remote get-url origin 2>/dev/null)
popd >/dev/null

if [ -z "$REMOTE" ]; then
continue
fi
if [ -z "$REMOTE" ]; then
continue
fi

echo "$PRJ_DIR=$REMOTE"
echo "$PRJ_DIR=$REMOTE"
done < <(find . -type d -name '.git' -follow)
}

Expand All @@ -22,16 +22,16 @@ _import() {
do
IFS='=' read PRJ_DIR REMOTE <<< "$line"

echo; echo "⏳ Cloning $PRJ_DIR"
git clone $REMOTE $PRJ_DIR
echo; echo "⏳ Cloning $PRJ_DIR"
git clone $REMOTE $PRJ_DIR
done < "${1:-/dev/stdin}"
}


if [ -t 0 ]; then
# tty
_export
_export
else
# no tty
_import
_import
fi

0 comments on commit 1e81cda

Please sign in to comment.