Make update scripts more robust
This commit is contained in:
parent
e3369d03e3
commit
a5b59f6301
|
@ -45,7 +45,7 @@ in {
|
||||||
main = do
|
main = do
|
||||||
say "Building ~/.modes for apollo"
|
say "Building ~/.modes for apollo"
|
||||||
nixPath <- myNixPath "${configPath}"
|
nixPath <- myNixPath "${configPath}"
|
||||||
bracket (rm canaryPath) (\() -> git "-C" privatePath "restore" canaryPath) $ \() ->
|
bracket (rm "-f" canaryPath) (\() -> git "-C" privatePath "restore" canaryPath) $ \() ->
|
||||||
nix_build nixPath (params ++ remoteBuildParams) &!> StdOut |> nom
|
nix_build nixPath (params ++ remoteBuildParams) &!> StdOut |> nom
|
||||||
nix_build nixPath params
|
nix_build nixPath params
|
||||||
activate_mode
|
activate_mode
|
||||||
|
|
|
@ -11,7 +11,7 @@ in {
|
||||||
main = do
|
main = do
|
||||||
paths <- myNixPath "${configPath}"
|
paths <- myNixPath "${configPath}"
|
||||||
args <- getArgs
|
args <- getArgs
|
||||||
bracket (rm canaryPath) (\() -> exe "/run/wrappers/bin/sudo" "-u" "maralorn" "git" "-C" privatePath "restore" canaryPath) $ \() -> do
|
bracket (rm "-f" canaryPath) (\() -> exe "/run/wrappers/bin/sudo" "-u" "maralorn" "git" "-C" privatePath "restore" canaryPath) $ \() -> do
|
||||||
nix_build (paths ++ buildSystemParams ++ ["--no-out-link"] ++ remoteBuildParams ++ fmap toString args) &!> StdOut |> nom
|
nix_build (paths ++ buildSystemParams ++ ["--no-out-link"] ++ remoteBuildParams ++ fmap toString args) &!> StdOut |> nom
|
||||||
nixos_rebuild (paths ++ ["switch"] ++ fmap toString args) &!> StdOut |> nom
|
nixos_rebuild (paths ++ ["switch"] ++ fmap toString args) &!> StdOut |> nom
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue