scripts/nix: fix `cache`

This commit is contained in:
Harsh Shandilya 2024-04-27 00:09:08 +05:30
parent eb937d0ddc
commit 4b0165fc96
1 changed files with 4 additions and 3 deletions

View File

@ -47,9 +47,10 @@ function nixb() {
}
function cache() {
local CACHE_PATHS ARCH KERNEL
CACHE_PATHS="${1}"
declare -a CACHE_PATHS
local ARCH KERNEL
CACHE_PATHS=("$@")
ARCH="$(uname -m)"
KERNEL="$(uname --kernel-name | tr '[:upper:]' '[:lower:]')"
attic push "${ARCH}-${KERNEL}" "${CACHE_PATHS:?}"
attic push "${ARCH}-${KERNEL}" "${CACHE_PATHS[@]:?}"
}