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:
parent
78d9a8d92b
commit
f702101224
2 changed files with 5 additions and 5 deletions
|
|
@ -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$''
|
||||||
|
|
|
||||||
|
|
@ -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-*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue