diff options
| author | jdlugosz963 <jdlugosz963@gmail.com> | 2022-10-04 17:10:57 +0200 |
|---|---|---|
| committer | jdlugosz963 <jdlugosz963@gmail.com> | 2022-10-04 17:10:57 +0200 |
| commit | 4e5222fdb85c0f77bcdfba2866e815cc6afe66da (patch) | |
| tree | 583dedd7df66acffd858c735b85a4da47f4100bf /bin/update-profiles | |
| parent | 79c31c7290e56f39982beed308d4b13a3d7e3c8c (diff) | |
| download | dotfiles-4e5222fdb85c0f77bcdfba2866e815cc6afe66da.tar.gz dotfiles-4e5222fdb85c0f77bcdfba2866e815cc6afe66da.zip | |
Add managing profiles scripts
Diffstat (limited to 'bin/update-profiles')
| -rwxr-xr-x | bin/update-profiles | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bin/update-profiles b/bin/update-profiles new file mode 100755 index 0000000..81129ec --- /dev/null +++ b/bin/update-profiles | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # Source: https://github.com/daviwil/dotfiles/blob/master/Systems.org#profile-management | ||
| 3 | |||
| 4 | GREEN='\033[1;32m' | ||
| 5 | NC='\033[0m' | ||
| 6 | GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles | ||
| 7 | |||
| 8 | profiles=$* | ||
| 9 | if [[ $# -eq 0 ]]; then | ||
| 10 | profiles="$GUIX_EXTRA_PROFILES/*"; | ||
| 11 | fi | ||
| 12 | |||
| 13 | for profile in $profiles; do | ||
| 14 | profileName=$(basename $profile) | ||
| 15 | profilePath=$GUIX_EXTRA_PROFILES/$profileName | ||
| 16 | |||
| 17 | echo | ||
| 18 | echo -e "${GREEN}Updating profile:" $profilePath "${NC}" | ||
| 19 | echo | ||
| 20 | |||
| 21 | guix package --profile="$profilePath/$profileName" --manifest="$HOME/.config/guix/manifests/$profileName.scm" | ||
| 22 | done | ||
