Compare commits
No commits in common. "f6de5961ce6bdb54c727daae376451e991c18705" and "f11913949aff95d9a962ad38b7ce035dc3f8d25e" have entirely different histories.
f6de5961ce
...
f11913949a
13 changed files with 18 additions and 18 deletions
|
@ -31,7 +31,7 @@ function deploySoftware -d "Deploys a the specified software action" -a action
|
||||||
source "$dir/../Software/xone/main.fish" $argv
|
source "$dir/../Software/xone/main.fish" $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
and for component in (getOSConfig hardware.components --json | jq '.[]' --raw-output0 | string split0 || true)
|
and for component in (getOSConfig hardware.components --json | jq '.[]' --raw-output0 | string split0)
|
||||||
switch "$component"
|
switch "$component"
|
||||||
case "Logitech G903"
|
case "Logitech G903"
|
||||||
source "$dir/../../Common/Drivers/Logitech G903/main.fish" $argv
|
source "$dir/../../Common/Drivers/Logitech G903/main.fish" $argv
|
||||||
|
|
|
@ -26,7 +26,7 @@ function backupAction -V dir
|
||||||
|
|
||||||
runHook backupUsers || begin
|
runHook backupUsers || begin
|
||||||
if [ -n "$deployScript" ]
|
if [ -n "$deployScript" ]
|
||||||
for name in (getUsers | jq '.[]' --raw-output0 | string split0 || true)
|
for name in (getUsers | jq '.[]' --raw-output0 | string split0)
|
||||||
echo "Backing up user `$name`..."
|
echo "Backing up user `$name`..."
|
||||||
and source $deployScript userBackup --user $name
|
and source $deployScript userBackup --user $name
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,7 +34,7 @@ function installAction -V dir
|
||||||
if [ -n "$deployScript" ]
|
if [ -n "$deployScript" ]
|
||||||
source "$dir/../../lib/settings.fish"
|
source "$dir/../../lib/settings.fish"
|
||||||
|
|
||||||
for name in (getUsers | jq '.[]' --raw-output0 | string split0 || true)
|
for name in (getUsers | jq '.[]' --raw-output0 | string split0)
|
||||||
echo "Configuring user `$name`..."
|
echo "Configuring user `$name`..."
|
||||||
and source $deployScript userConfig --user $name
|
and source $deployScript userConfig --user $name
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@ set -l users (getUsers)
|
||||||
|
|
||||||
echo "Creating users..."
|
echo "Creating users..."
|
||||||
|
|
||||||
for name in (echo "$users" | jq '.[]' --raw-output0 | string split0 || true)
|
for name in (echo "$users" | jq '.[]' --raw-output0 | string split0)
|
||||||
echo "Creating user `$name`..."
|
echo "Creating user `$name`..."
|
||||||
|
|
||||||
function getUserInfo -V name -a config
|
function getUserInfo -V name -a config
|
||||||
|
|
|
@ -33,7 +33,7 @@ function installExtension -d "Installs a Chromium extension for the browser with
|
||||||
sudo chmod -R u+w "$extensionDir"
|
sudo chmod -R u+w "$extensionDir"
|
||||||
sudo mkdir -p "$policyDir"
|
sudo mkdir -p "$policyDir"
|
||||||
|
|
||||||
for manifest in (find "$policyDir" -name "*.json" -print0 | string split0 || true)
|
for manifest in (find "$policyDir" -name "*.json" -print0 | string split0)
|
||||||
if [ (cat "$manifest" | jq -r ".$property") = "$destination" ]
|
if [ (cat "$manifest" | jq -r ".$property") = "$destination" ]
|
||||||
sudo rm "$manifest"
|
sudo rm "$manifest"
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,7 +18,7 @@ begin
|
||||||
argparse -i "name=" "user=" -- $argv
|
argparse -i "name=" "user=" -- $argv
|
||||||
set -l services (getProgramConfig --name "$_flag_name" --json | jq '.services')
|
set -l services (getProgramConfig --name "$_flag_name" --json | jq '.services')
|
||||||
|
|
||||||
for service in (echo "$services" | jq '. // {} | keys[]' --raw-output0 | string split0 || true)
|
for service in (echo "$services" | jq '. // {} | keys[]' --raw-output0 | string split0)
|
||||||
|
|
||||||
if echo "$services" | SERVICE=$service jq --exit-status ".[env.SERVICE].enable" >/dev/null
|
if echo "$services" | SERVICE=$service jq --exit-status ".[env.SERVICE].enable" >/dev/null
|
||||||
fish "$dir/services/$service/main.fish" $argv
|
fish "$dir/services/$service/main.fish" $argv
|
||||||
|
|
|
@ -30,7 +30,7 @@ begin
|
||||||
set uid (id -u $user)
|
set uid (id -u $user)
|
||||||
set gid (id -g $user)
|
set gid (id -g $user)
|
||||||
|
|
||||||
for service in (yq -0 ".services | keys[]" "$config" | string split0 || true)
|
for service in (yq -0 ".services | keys[]" "$config" | string split0)
|
||||||
set -l envKey "$(getServiceKey "$service").environment"
|
set -l envKey "$(getServiceKey "$service").environment"
|
||||||
cp "$config" "$file"
|
cp "$config" "$file"
|
||||||
|
|
||||||
|
|
|
@ -129,10 +129,10 @@ begin
|
||||||
|
|
||||||
function installDockerService -V dir -V nginxRoot
|
function installDockerService -V dir -V nginxRoot
|
||||||
set -l config (getServiceOverrides $argv)
|
set -l config (getServiceOverrides $argv)
|
||||||
set -l servers (getServiceServers $argv | string split0 || true)
|
set -l servers (getServiceServers $argv | string split0)
|
||||||
|
|
||||||
for i in (seq 1 2 (count $servers))
|
for i in (seq 1 2 (count $servers))
|
||||||
set -l locations (getServiceLocations $i $argv | string split0 || true)
|
set -l locations (getServiceLocations $i $argv | string split0)
|
||||||
|
|
||||||
for j in (seq 1 3 (count $locations))
|
for j in (seq 1 3 (count $locations))
|
||||||
set -l file (mktemp)
|
set -l file (mktemp)
|
||||||
|
@ -151,13 +151,13 @@ begin
|
||||||
end
|
end
|
||||||
|
|
||||||
function configureDockerService
|
function configureDockerService
|
||||||
set -l servers (getServiceServers $argv | string split0 || true)
|
set -l servers (getServiceServers $argv | string split0)
|
||||||
set -l nginxConfig (__getServiceNginxConfig $argv)
|
set -l nginxConfig (__getServiceNginxConfig $argv)
|
||||||
|
|
||||||
for i in (seq 1 2 (count $servers))
|
for i in (seq 1 2 (count $servers))
|
||||||
set -l domain $servers[(math $i + 1)]
|
set -l domain $servers[(math $i + 1)]
|
||||||
set -l subdomain $servers[(math $i)]
|
set -l subdomain $servers[(math $i)]
|
||||||
set -l locations (getServiceLocations $i $argv | string split0 || true)
|
set -l locations (getServiceLocations $i $argv | string split0)
|
||||||
set domain (getServiceDomain "$subdomain" "$domain")
|
set domain (getServiceDomain "$subdomain" "$domain")
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -73,7 +73,7 @@ begin
|
||||||
set sessionPid (sudo pgrep -t $freeTty -u "$name")
|
set sessionPid (sudo pgrep -t $freeTty -u "$name")
|
||||||
end
|
end
|
||||||
|
|
||||||
sudo openvt -sw -- sudo -u "$name" env (sudo cat /proc/$sessionPid/environ | string split0 || true) /usr/lib/plasma-dbus-run-session-if-needed startplasma-wayland
|
sudo openvt -sw -- sudo -u "$name" env (sudo cat /proc/$sessionPid/environ | string split0) /usr/lib/plasma-dbus-run-session-if-needed startplasma-wayland
|
||||||
sudo rm "$entryPoint"
|
sudo rm "$entryPoint"
|
||||||
sudo rm "$welcomeConfig"
|
sudo rm "$welcomeConfig"
|
||||||
sudo rm "$sessionConfig"
|
sudo rm "$sessionConfig"
|
||||||
|
@ -87,7 +87,7 @@ begin
|
||||||
mkdir -p ~/.mnt
|
mkdir -p ~/.mnt
|
||||||
touch ~/.mnt/.trackerignore
|
touch ~/.mnt/.trackerignore
|
||||||
|
|
||||||
for config in (echo "$configs" | jq '.[]' --raw-output0 | string split0 || true)
|
for config in (echo "$configs" | jq '.[]' --raw-output0 | string split0)
|
||||||
set -l configKey "$key.$config"
|
set -l configKey "$key.$config"
|
||||||
set -l duration "$configKey.cacheDuration"
|
set -l duration "$configKey.cacheDuration"
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ function runSetupUserAction -V dir
|
||||||
set -l name (getOSConfig setupUser.name)
|
set -l name (getOSConfig setupUser.name)
|
||||||
|
|
||||||
if [ "$USER" != "$name" ]
|
if [ "$USER" != "$name" ]
|
||||||
set -l cmdline (cat /proc/$fish_pid/cmdline | string split0 || true)
|
set -l cmdline (cat /proc/$fish_pid/cmdline | string split0)
|
||||||
|
|
||||||
if [ (id -u) -ne 0 ]
|
if [ (id -u) -ne 0 ]
|
||||||
sudo --set-home --preserve-env env "PATH=$PATH" $cmdline
|
sudo --set-home --preserve-env env "PATH=$PATH" $cmdline
|
||||||
|
|
|
@ -9,7 +9,7 @@ function selectProfile -S -a result
|
||||||
set -l header NAME
|
set -l header NAME
|
||||||
set -l profiles
|
set -l profiles
|
||||||
|
|
||||||
getProfiles | jq ".[]" --raw-output0 | begin; string split0 || true; end | while read profile
|
getProfiles | jq ".[]" --raw-output0 | string split0 | while read profile
|
||||||
set -a profiles "$profile"
|
set -a profiles "$profile"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ begin
|
||||||
functions -e "$dependencyFunction"
|
functions -e "$dependencyFunction"
|
||||||
end
|
end
|
||||||
|
|
||||||
if $force || isProgramEnabled $args
|
if isProgramEnabled $args || $force
|
||||||
set install true
|
set install true
|
||||||
else
|
else
|
||||||
set install false
|
set install false
|
||||||
|
@ -180,7 +180,7 @@ begin
|
||||||
set -a args --user "$user"
|
set -a args --user "$user"
|
||||||
end
|
end
|
||||||
|
|
||||||
if $force || isProgramEnabled $args
|
if isProgramEnabled $args || $force
|
||||||
set install true
|
set install true
|
||||||
else
|
else
|
||||||
set install false
|
set install false
|
||||||
|
|
|
@ -215,7 +215,7 @@ begin
|
||||||
and begin
|
and begin
|
||||||
source "$dir/../scripts/lib/settings.fish"
|
source "$dir/../scripts/lib/settings.fish"
|
||||||
|
|
||||||
and for name in (getProfiles | jq '.[]' --raw-output0 | string split0 || true)
|
and for name in (getProfiles | jq '.[]' --raw-output0 | string split0)
|
||||||
set -l CONFIG_NAME "$name"
|
set -l CONFIG_NAME "$name"
|
||||||
set -l file "$projectPath/.config/$name.json"
|
set -l file "$projectPath/.config/$name.json"
|
||||||
and mkdir -p (dirname $file)
|
and mkdir -p (dirname $file)
|
||||||
|
|
Loading…
Reference in a new issue