Re: Get ${OSREL} at install time
- Reply: Felix Palmen : "Re: Get ${OSREL} at install time"
- In reply to: Nuno Teixeira : "Re: Get ${OSREL} at install time"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Apr 2023 11:38:12 UTC
(...) and a slightly different result: @postexec env osrel=$(freebsd-version -u) sed -E -e "s,stable/[0-9]+,stable/${osrel%%.*}," -e "s,releng/[0-9]+,releng/${osrel%%-*}," %%PREFIX%%/etc/gitup.conf "branch" : "releng/.4", "branch" : "stable/", Nuno Teixeira <eduardo@freebsd.org> escreveu no dia terça, 18/04/2023 à(s) 12:28: > pkg-plist: > @postexec env osrel=$(freebsd-version -u) sed -E -e > "s|stable\/12|stable\/${osrel%%.*}|" -e > "s|releng\/11.4|releng\/${osrel%%-*}|" %%PREFIX%%/etc/gitup.conf > > result: > --- > "branch" : "releng/", > "branch" : "stable/", > --- > > For sure I'm doing something wrong with syntax. > > Nuno Teixeira <eduardo@freebsd.org> escreveu no dia terça, 18/04/2023 > à(s) 12:02: > >> Fixed! >> >> (on 13.2-RELEASE) >> >> gitup.conf: >> --- >> "release" : { >> "repository_path" : "/src.git", >> "branch" : "releng/13.2", >> "target_directory" : "/usr/src", >> "ignores" : [ >> "sys/[^\/]+/conf", >> ], >> }, >> >> "stable" : { >> "repository_path" : "/src.git", >> "branch" : "stable/13", >> "target_directory" : "/usr/src", >> "ignores" : [ >> "sys/[^\/]+/conf", >> --- >> >> Nice! I have now a working pkg-post-install. >> Need to have a pkg-plist method working too so it can be discussed the >> best method to use. >> >> Felix Palmen <zirias@freebsd.org> escreveu no dia terça, 18/04/2023 à(s) >> 11:58: >> >>> * Nuno Teixeira <eduardo@freebsd.org> [20230418 11:55]: >>> > sed -E -e 's|stable\/12|stable\/${stable}|' -e >>> [...] >>> > sed doesn't subtitute as it uses literal variables >>> >>> The shell doesn't subsitute variables inside single quotes. Try double >>> quotes instead. >>> >>> -- >>> Felix Palmen <zirias@FreeBSD.org> {private} felix@palmen-it.de >>> -- ports committer (mentee) -- {web} http://palmen-it.de >>> {pgp public key} http://palmen-it.de/pub.txt >>> {pgp fingerprint} 6936 13D5 5BBF 4837 B212 3ACC 54AD E006 9879 F231 >>> >> >> >> -- >> Nuno Teixeira >> FreeBSD Committer (ports) >> > > > -- > Nuno Teixeira > FreeBSD Committer (ports) > -- Nuno Teixeira FreeBSD Committer (ports)