1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 03:56:01 +01:00

shellcheck fix: tests/functional/install-darwin.sh

This commit is contained in:
Farid Zakaria 2025-09-29 09:27:09 -07:00
parent 78d9a8d92b
commit f702101224
2 changed files with 5 additions and 5 deletions

View file

@ -106,7 +106,6 @@
enable = true; enable = true;
excludes = [ excludes = [
# We haven't linted these files yet # We haven't linted these files yet
''^tests/functional/install-darwin\.sh$''
''^tests/functional/legacy-ssh-store\.sh$'' ''^tests/functional/legacy-ssh-store\.sh$''
''^tests/functional/linux-sandbox\.sh$'' ''^tests/functional/linux-sandbox\.sh$''
''^tests/functional/logging\.sh$'' ''^tests/functional/logging\.sh$''

View file

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
set -eux set -eux
@ -21,12 +21,13 @@ cleanup() {
for file in ~/.bash_profile ~/.bash_login ~/.profile ~/.zshenv ~/.zprofile ~/.zshrc ~/.zlogin; do for file in ~/.bash_profile ~/.bash_login ~/.profile ~/.zshenv ~/.zprofile ~/.zshrc ~/.zlogin; do
if [ -e "$file" ]; then if [ -e "$file" ]; then
# shellcheck disable=SC2002
cat "$file" | grep -v nix-profile > "$file.next" cat "$file" | grep -v nix-profile > "$file.next"
mv "$file.next" "$file" mv "$file.next" "$file"
fi fi
done done
for i in $(seq 1 $(sysctl -n hw.ncpu)); do for i in $(seq 1 "$(sysctl -n hw.ncpu)"); do
sudo /usr/bin/dscl . -delete "/Users/nixbld$i" || true sudo /usr/bin/dscl . -delete "/Users/nixbld$i" || true
done done
sudo /usr/bin/dscl . -delete "/Groups/nixbld" || true sudo /usr/bin/dscl . -delete "/Groups/nixbld" || true
@ -65,11 +66,11 @@ verify
echo nix-build ./release.nix -A binaryTarball.x86_64-darwin echo nix-build ./release.nix -A binaryTarball.x86_64-darwin
) | bash -l ) | bash -l
set -e set -e
cp ./result/nix-*.tar.bz2 $scratch/nix.tar.bz2 cp ./result/nix-*.tar.bz2 "$scratch"/nix.tar.bz2
) )
( (
cd $scratch cd "$scratch"
tar -xf ./nix.tar.bz2 tar -xf ./nix.tar.bz2
cd nix-* cd nix-*