Execute partition script using shebang
This commit is contained in:
parent
b5f8949138
commit
afbff7ac8c
2 changed files with 8 additions and 3 deletions
|
@ -344,8 +344,11 @@
|
|||
sudo swapon ${partPath _}
|
||||
'')
|
||||
(builtins.filter (_: _.useSwap) partitions));
|
||||
in lib.strings.concatLines (
|
||||
(builtins.map (_: _.deviceScript) disks) ++ lib.optionals ((builtins.length disks) > 0) [
|
||||
in lib.strings.concatLines ([
|
||||
"#!/bin/bash"
|
||||
] ++
|
||||
(builtins.map (_: _.deviceScript) disks) ++
|
||||
lib.optionals ((builtins.length disks) > 0) [
|
||||
". ${./../../../scripts/Common/Scripts/is-truthy.sh}"
|
||||
''echo "$(tput setaf 3)==== WARNING ====$(tput sgr0)"''
|
||||
(''echo "Continuing this script will alter the partitions of '' + (
|
||||
|
|
|
@ -8,6 +8,7 @@ function runSetup
|
|||
set -l projectName (basename "$projectRoot")
|
||||
set -l PROJECT_CLONE_ROOT "/opt/$(basename "$projectName")"
|
||||
set -l script (mktemp)
|
||||
chmod +x "$script"
|
||||
|
||||
if not type -q runChroot
|
||||
function runChroot -S
|
||||
|
@ -44,7 +45,8 @@ function runSetup
|
|||
end
|
||||
|
||||
getConfig valhalla.partition.script > "$script"
|
||||
bash "$script"
|
||||
and "$script"
|
||||
and rm "$script"
|
||||
|
||||
# Copy `nixpkgs` channel
|
||||
and begin
|
||||
|
|
Loading…
Reference in a new issue