Skip to content

Commit

Permalink
Fix shceck issues
Browse files Browse the repository at this point in the history
  • Loading branch information
donkahlero committed Jul 15, 2021
1 parent 26e7c60 commit 831c42c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tomono.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# script from bash instead of executing it.

${DEBUGSH:+set -x}
if [[ "$BASH_SOURCE" == "$0" ]]; then
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
is_script=true
set -eu -o pipefail
else
Expand Down Expand Up @@ -55,7 +55,7 @@ function create-mono {
pushd "$MONOREPO_NAME"
else
if [[ -d "$MONOREPO_NAME" ]]; then
echo "Target repository directory $MONOREPO_NAME already exists." >&2
echo "Target repository directory ${MONOREPO_NAME} already exists." >&2
return 1
fi
mkdir "$MONOREPO_NAME"
Expand All @@ -68,17 +68,17 @@ function create-mono {
echo "pass REPOSITORY NAME pairs on stdin" >&2
return 1
elif [[ "$name" = */* ]]; then
echo "Forward slash '/' not supported in repo names: $name" >&2
echo "Forward slash '/' not supported in repo names: ${name}" >&2
return 1
fi

if [[ -z "$folder" ]]; then
folder="$name"
fi

echo "Merging in $repo.." >&2
echo "Merging in ${repo}..." >&2
git remote add "$name" "$repo"
echo "Fetching $name.." >&2
echo "Fetching ${name}..." >&2
git fetch -q "$name"

# Copy tags including their proper content
Expand Down Expand Up @@ -121,9 +121,9 @@ function create-mono {
git rm -rfq --ignore-unmatch .
git commit -q --allow-empty -m "Root commit for $branch branch"
fi
git merge -q --no-commit -s ours "$name/$branch" --allow-unrelated-histories
git read-tree --prefix="$folder/" "$name/$branch"
git commit -q --no-verify --allow-empty -m "Merge branch '$name' into '$branch'"
git merge -q --no-commit -s ours "${name}/${branch}" --allow-unrelated-histories
git read-tree --prefix="${folder}/" "${name}/${branch}"
git commit -q --no-verify --allow-empty -m "Merge branch '${name}' into '${branch}'"
done
done

Expand Down

0 comments on commit 831c42c

Please sign in to comment.