1
0
Fork 0
dotfiles/home/programs/scripts/update-nedeco-devshell-cache

21 lines
450 B
Plaintext
Raw Normal View History

2023-07-28 22:58:25 +00:00
#!/usr/bin/env nix-shell
2023-07-29 11:08:55 +00:00
#!nix-shell -i bash -p git fd ripgrep
2023-07-28 22:58:25 +00:00
# shellcheck disable=SC1008
2023-07-28 23:37:08 +00:00
if git remote -v | rg -q nedeco; then
2023-07-29 11:08:55 +00:00
nix path-info -r "$(fd '^flake-profile-[a-z0-9]+$' ./.direnv/)" | while read -r dir; do
2023-07-28 23:37:08 +00:00
echo "Uploading $dir ..."
2023-07-28 22:58:25 +00:00
2023-07-28 23:37:08 +00:00
if attic push nedeco:devshells "$dir"; then
continue
else
echo "Ignoring error ..."
fi
done
else
echo "Doesn't look like a work repository"
exit 1
fi
# vim: set ft=sh: