Reformat shell scripts
This commit is contained in:
parent
3d32f750f0
commit
697f164aa5
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
cd /home/andreas/.nixos
|
cd /home/andreas/.nixos
|
||||||
|
|
||||||
hosts=($(echo `nix eval .#nixosConfigurations --apply 'pkgs: builtins.concatStringsSep " " (builtins.attrNames pkgs)'` | xargs ))
|
hosts=($(echo $(nix eval .#nixosConfigurations --apply 'pkgs: builtins.concatStringsSep " " (builtins.attrNames pkgs)') | xargs))
|
||||||
skip=(
|
skip=(
|
||||||
"desktop-vm"
|
"desktop-vm"
|
||||||
"gwyn"
|
"gwyn"
|
||||||
|
@ -20,11 +20,11 @@ while getopts ":r" option; do
|
||||||
case $option in
|
case $option in
|
||||||
r)
|
r)
|
||||||
reboot=1
|
reboot=1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
for host in "${hosts[@]}"
|
for host in "${hosts[@]}"; do
|
||||||
do
|
|
||||||
# Check if the host is in the skip list
|
# Check if the host is in the skip list
|
||||||
if [[ " ${skip[*]} " =~ " ${host} " ]]; then
|
if [[ " ${skip[*]} " =~ " ${host} " ]]; then
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
hosts=($(echo `nix eval .#nixosConfigurations --apply 'pkgs: builtins.concatStringsSep " " (builtins.attrNames pkgs)'` | xargs ))
|
hosts=($(echo $(nix eval .#nixosConfigurations --apply 'pkgs: builtins.concatStringsSep " " (builtins.attrNames pkgs)') | xargs))
|
||||||
skip=(
|
skip=(
|
||||||
"desktop-vm"
|
"desktop-vm"
|
||||||
"gwyn"
|
"gwyn"
|
||||||
|
@ -10,9 +10,7 @@ skip=(
|
||||||
"staubfinger"
|
"staubfinger"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
for host in "${hosts[@]}"; do
|
||||||
for host in "${hosts[@]}"
|
|
||||||
do
|
|
||||||
if [[ " ${skip[*]} " =~ " ${host} " ]]; then
|
if [[ " ${skip[*]} " =~ " ${host} " ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue