summaryrefslogtreecommitdiffstats
path: root/update.sh
diff options
context:
space:
mode:
authorCole Mickens <cole.mickens@gmail.com>2018-10-24 06:59:24 -0700
committerCole Mickens <cole.mickens@gmail.com>2018-10-24 06:59:24 -0700
commitf2f68817f8f70dee2eb8cb946b356cb89c8be6d4 (patch)
tree8b893cca2cf90c83dcae06fe81aaab30ec9fa4c8 /update.sh
parent74d575d207419d3c641bf29a35ceff6927681b4f (diff)
update.sh: auto-upload to cache after build
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/update.sh b/update.sh
index 572b6a1..69672ba 100755
--- a/update.sh
+++ b/update.sh
@@ -27,6 +27,7 @@ EOF
}
# attr_name repo_owner repo_name repo_rev
+if [[ -z "${SKIP:-}" ]]; then
update "wlroots" "swaywm" "wlroots" "master"
update "sway-beta" "swaywm" "sway" "master"
update "slurp" "emersion" "slurp" "master"
@@ -34,11 +35,16 @@ update "grim" "emersion" "grim" "master"
update "wlstream" "atomnuker" "wlstream" "master"
update "waybar" "Alexays" "waybar" "master"
update "nixpkgs" "nixos" "nixpkgs-channels" "nixos-unstable"
+fi
-nix-build --no-out-link build.nix
+results="$(nix-build --no-out-link build.nix)"
+readarray -t out <<< "$(echo "${results}")"
d="$(date -Iseconds)"
m="(.+)"
t="<!--update-->"
sed -i -E "s/${t}${m}${t}/${t}${d}${t}/g" README.md
+if [[ -e "/etc/nixcfg/utils/azure/nix-copy-azure.sh" ]]; then
+ "/etc/nixcfg/utils/azure/nix-copy-azure.sh" "${out[@]}"
+fi