From: Gottfried <gottfried@posteo.de>
To: Gary Johnson <lambdatronic@disroot.org>, help-guix@gnu.org
Subject: update-profiles.sh
Date: Mon, 24 Apr 2023 11:22:46 +0000 [thread overview]
Message-ID: <c13b82a0-9e63-d614-d48a-cc55a089e263@posteo.de> (raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 3223 bytes --]
Hi,
Sorry,
you provided me already with a script for activating all profiles at login,
I don’t know at the moment, why I have mixed it up with other things
and I didn’t use it.
------------------------------------------------------------
in the meantime all packages are available at login
through the help of Martin
------------------------------------------------------------
so I tried to use your "update-profiles.sh"
I placed it in my home directory: ~/gfp
and changed one sentence, my the place of the profiles:
update-profiles.sh
#!/bin/sh
GUIX_MANIFESTS=$HOME/sys/guix/manifests
GUIX_PROFILES=home/gfp/Projekte
for dir in $GUIX_PROFILES/*
do
name=$(basename "$dir")
manifest=$GUIX_MANIFESTS/$name.scm
profile=$dir/$name
if [ -r $manifest ]
then
guix package --manifest="$manifest" --profile="$profile"
fi
unset profile
unset manifest
unset name
done
-------------------------------------------------
but running it, it seems not doing anything.
sometimes it’s difficult for me, to know so little, not knowing what I
have to do, not knowing the basics ...
Is it connected with the other script to activate the profiles at login?
so that it doesn’t work?
I guess both scripts are independent.
or is the path to it wrong?
I have the directory
~/gfp/Projekte
and in it many directories/which are the different profiles, e.g:
Musescore, Musik, Emacs, Calibre, Gnucash, Icecat, Libreoffice,
Photoflare, Lilypond
and in each of these directories a scm.file with the same name but in
small letters like: musescore.scm, musik.scm, emacs.scm ...
Kind regards
Gottfried
> I believe I already provided you with the code for updating profiles and
> activating them, but here it is again for reference:
>
> ```update-profiles.sh
> #!/bin/sh
>
> GUIX_MANIFESTS=$HOME/sys/guix/manifests
> GUIX_PROFILES=$HOME/sys/guix/profiles
>
> for dir in $GUIX_PROFILES/*
> do
> name=$(basename "$dir")
> manifest=$GUIX_MANIFESTS/$name.scm
> profile=$dir/$name
> if [ -r $manifest ]
> then
> guix package --manifest="$manifest" --profile="$profile"
> fi
> unset profile
> unset manifest
> unset name
> done
> ```
>
> ```activate-profiles.sh
> #!/bin/sh
>
> GUIX_PROFILES=$HOME/sys/guix/profiles
>
> for dir in $GUIX_PROFILES/*
> do
> name=$(basename "$dir")
> profile=$dir/$name
> if [ -f "$profile"/etc/profile ]
> then
> GUIX_PROFILE="$profile"
> . "$GUIX_PROFILE"/etc/profile
> export MANPATH="$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH"
> export INFOPATH="$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOPATH"
> fi
> unset profile
> unset name
> done
> ```
>
> These scripts both loop over my manifests or profiles directories,
> running the upgrade or activate commands on each one. If you want to
> exclude a profile from being upgraded with this script, you can just
> take away its manifest's read permissons like so:
>
> ```
> chmod -r $HOME/sys/guix/manifests/my-excluded-manifest.scm
> ```
>
> Good luck,
> Gary
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3191 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next reply other threads:[~2023-04-24 11:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-24 11:22 Gottfried [this message]
2023-04-24 12:05 ` update-profiles.sh Wojtek Kosior via
2023-04-24 15:42 ` update-profiles.sh Gottfried
2023-04-24 18:11 ` update-profiles.sh Wojtek Kosior via
2023-04-25 15:51 ` update-profiles.sh Gottfried
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c13b82a0-9e63-d614-d48a-cc55a089e263@posteo.de \
--to=gottfried@posteo.de \
--cc=help-guix@gnu.org \
--cc=lambdatronic@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).