shellcheck: fix lint of package helper bash scripts
This commit is contained in:
parent
9a92d29111
commit
a59c3b4b8a
8 changed files with 55 additions and 53 deletions
|
|
@ -8,18 +8,19 @@ repo=https://github.com/Ride-The-Lightning/RTL
|
|||
scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd)
|
||||
|
||||
updateSrc() {
|
||||
TMPDIR="$(mktemp -d /tmp/rtl.XXX)"
|
||||
trap "rm -rf $TMPDIR" EXIT
|
||||
TMPDIR=$(mktemp -d /tmp/rtl.XXX)
|
||||
trap 'rm -rf $TMPDIR' EXIT
|
||||
|
||||
# Fetch and verify source tarball
|
||||
export GNUPGHOME=$TMPDIR
|
||||
|
||||
# Fetch saubyk's key
|
||||
gpg --keyserver hkps://keyserver.ubuntu.com --recv-key 3E9BD4436C288039CA827A9200C9E2BC2E45666F
|
||||
file=v${version}.tar.gz
|
||||
wget -P $TMPDIR $repo/archive/refs/tags/$file
|
||||
wget -P $TMPDIR $repo/releases/download/v${version}/$file.asc
|
||||
gpg --verify $TMPDIR/$file.asc $TMPDIR/$file
|
||||
hash=$(nix hash file $TMPDIR/$file)
|
||||
file=v$version.tar.gz
|
||||
wget -P "$TMPDIR" "$repo/archive/refs/tags/$file"
|
||||
wget -P "$TMPDIR" "$repo/releases/download/v$version/$file.asc"
|
||||
gpg --verify "$TMPDIR/$file.asc" "$TMPDIR/$file"
|
||||
hash=$(nix hash file "$TMPDIR/$file")
|
||||
|
||||
sed -i "
|
||||
s|\bversion = .*;|version = \"$version\";|
|
||||
|
|
@ -28,7 +29,7 @@ updateSrc() {
|
|||
}
|
||||
|
||||
updateNodeModulesHash() {
|
||||
$scriptDir/../../helper/update-fixed-output-derivation.sh ./default.nix rtl.nodeModules nodeModules
|
||||
"$scriptDir/../../helper/update-fixed-output-derivation.sh" ./default.nix rtl.nodeModules nodeModules
|
||||
}
|
||||
|
||||
if [[ $# == 0 ]]; then
|
||||
|
|
@ -36,5 +37,5 @@ if [[ $# == 0 ]]; then
|
|||
updateSrc
|
||||
updateNodeModulesHash
|
||||
else
|
||||
eval "$@"
|
||||
"$@"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue