From 826bf809794e9287cdebfe51f51173f133b1628b Mon Sep 17 00:00:00 2001 From: Maximilian Held Date: Mon, 20 Jan 2025 19:57:54 +0100 Subject: [PATCH] fix lint --- install.sh | 8 +++++--- scripts/symlink_ignore.bash | 36 ++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/install.sh b/install.sh index 0c2e3f8..bd6cc78 100755 --- a/install.sh +++ b/install.sh @@ -1,14 +1,16 @@ #!/bin/bash echo "(Re-)Installing Muggle..." -# Change to the directory where the script resides -cd "$(dirname "$0")" +# Change to the directory where the script resides, exit if it fails +cd "$(dirname "$0")" || exit echo "(Over-)writing GitHub Actions workflow files ..." cp -f gha/lint.yml ../.github/workflows/lint.yml echo "(Re-)creating Symbolic Links ..." -./scripts/symlink_ignore.bash --source in_submodule.make --target Makefile +./scripts/symlink_ignore.bash \ + --source in_submodule.make \ + --target Makefile ./scripts/symlink_ignore.bash \ --source docker-compose.yml \ --target docker-compose.yml diff --git a/scripts/symlink_ignore.bash b/scripts/symlink_ignore.bash index 26b7a61..d822944 100755 --- a/scripts/symlink_ignore.bash +++ b/scripts/symlink_ignore.bash @@ -8,28 +8,28 @@ target="" # Parse command line options while [[ $# -gt 0 ]]; do - case $1 in - --source) - source="$2" - shift # past argument - shift # past value - ;; - --target) - target="$2" - shift # past argument - shift # past value - ;; - *) - echo "Unknown option: $1" - exit 1 - ;; - esac + case $1 in + --source) + source="$2" + shift # past argument + shift # past value + ;; + --target) + target="$2" + shift # past argument + shift # past value + ;; + *) + echo "Unknown option: $1" + exit 1 + ;; + esac done # Check if required arguments were provided if [ -z "$source" ] || [ -z "$target" ]; then - echo "Usage: $0 --source --target " - exit 1 + echo "Usage: $0 --source --target " + exit 1 fi original_dir=$(pwd)