mirror of
https://github.com/cpina/github-action-push-to-another-repository.git
synced 2024-12-22 08:06:10 -07:00
Use indentation consistenly
This commit is contained in:
parent
d4122690a7
commit
af82da7f2b
|
@ -17,12 +17,12 @@ TARGET_DIRECTORY="${10}"
|
||||||
|
|
||||||
if [ -z "$DESTINATION_REPOSITORY_USERNAME" ]
|
if [ -z "$DESTINATION_REPOSITORY_USERNAME" ]
|
||||||
then
|
then
|
||||||
DESTINATION_REPOSITORY_USERNAME="$DESTINATION_GITHUB_USERNAME"
|
DESTINATION_REPOSITORY_USERNAME="$DESTINATION_GITHUB_USERNAME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$USER_NAME" ]
|
if [ -z "$USER_NAME" ]
|
||||||
then
|
then
|
||||||
USER_NAME="$DESTINATION_GITHUB_USERNAME"
|
USER_NAME="$DESTINATION_GITHUB_USERNAME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CLONE_DIR=$(mktemp -d)
|
CLONE_DIR=$(mktemp -d)
|
||||||
|
@ -44,8 +44,8 @@ echo "[+] Checking if $TARGET_DIRECTORY exist in git repo $DESTINATION_REPOSITOR
|
||||||
# Remove contents of target directory and create a new empty one
|
# Remove contents of target directory and create a new empty one
|
||||||
if [ -d "$CLONE_DIR/$TARGET_DIRECTORY/" ]
|
if [ -d "$CLONE_DIR/$TARGET_DIRECTORY/" ]
|
||||||
then
|
then
|
||||||
echo "[+] Deleting files from $TARGET_DIRECTORY in git repo $DESTINATION_REPOSITORY_NAME"
|
echo "[+] Deleting files from $TARGET_DIRECTORY in git repo $DESTINATION_REPOSITORY_NAME"
|
||||||
rm -R "${CLONE_DIR:?}/$TARGET_DIRECTORY/"
|
rm -R "${CLONE_DIR:?}/$TARGET_DIRECTORY/"
|
||||||
fi
|
fi
|
||||||
echo "[+] Creating $TARGET_DIRECTORY if doesnt already exist"
|
echo "[+] Creating $TARGET_DIRECTORY if doesnt already exist"
|
||||||
mkdir -p "$CLONE_DIR/$TARGET_DIRECTORY"
|
mkdir -p "$CLONE_DIR/$TARGET_DIRECTORY"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user