diff options
author | Patrick Spek <p.spek@tyil.nl> | 2020-05-12 10:34:37 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2020-11-20 20:42:29 +0100 |
commit | dfe0e762c03caf234f8840c1f8c91188bb081a32 (patch) | |
tree | dc0c0813d5020bf9e12908c573ec5f7d854d7fe3 /lib | |
parent | 96b88dae054b1a1764b7cc21320500a1ee679a20 (diff) |
Fix shellcheck warnings
Diffstat (limited to 'lib')
-rw-r--r-- | lib/actions/fetch.bash | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/actions/fetch.bash b/lib/actions/fetch.bash index ec65aaa..4c95b0a 100644 --- a/lib/actions/fetch.bash +++ b/lib/actions/fetch.bash @@ -72,21 +72,20 @@ download_module_git() { notice "Cloning $url@$ref to $destination" mkdir -p -- "$destination" - pushd -- "$destination" > /dev/null + chgdir "$destination" git init > /dev/null git remote add origin "$url" 2> /dev/null git fetch origin -a 2> /dev/null # Try to use the ref (branch or tag) - if ! git reset --hard "origin/$ref" 2>&1 > /dev/null + if ! git reset --hard "origin/$ref" > /dev/null 2>&1 then # Or the commit hash git reset --hard "$(git log -1 --format=format:"%H" "$ref")" fi rm -fr -- .git - popd -- "$destination" > /dev/null } download_module_http() { |