Reformat shell scripts

This commit is contained in:
Andreas Zweili 2023-11-26 12:14:24 +01:00
parent 3d32f750f0
commit 697f164aa5
3 changed files with 9 additions and 11 deletions

View File

@ -2,7 +2,7 @@
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=(
"desktop-vm"
"gwyn"
@ -20,11 +20,11 @@ while getopts ":r" option; do
case $option in
r)
reboot=1
;;
esac
done
for host in "${hosts[@]}"
do
for host in "${hosts[@]}"; do
# Check if the host is in the skip list
if [[ " ${skip[*]} " =~ " ${host} " ]]; then
continue

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
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=(
"desktop-vm"
"gwyn"
@ -10,9 +10,7 @@ skip=(
"staubfinger"
)
for host in "${hosts[@]}"
do
for host in "${hosts[@]}"; do
if [[ " ${skip[*]} " =~ " ${host} " ]]; then
continue
fi