add development chroot environment

master
an 2020-11-15 14:03:33 -07:00
förälder 05ccdf3db0
incheckning a86a935b69
4 ändrade filer med 55 tillägg och 6 borttagningar

Visa fil

@ -10,15 +10,18 @@ end
# - _agw_dir_bin = volatile binary storage
# - _agw_dir_rc = the directory holding this repository
# - _agw_dir_src = non-volatile source code storage
# - _agw_dir_dev = volatile chroot development environment
switch (uname)
case Linux NetBSD
set -Ux _agw_dir_bin ~/bin
set -Ux _agw_dir_rc ~/rc
set -Ux _agw_dir_src ~/src
set -Ux _agw_dir_dev ~/dev
case Darwin
set -Ux _agw_dir_bin ~/Binaries
set -Ux _agw_dir_rc ~/Sources/scripts
set -Ux _agw_dir_src ~/Sources
set -Ux _agw_dir_dev ~/Development
case \*
echo (set_color red)"This platform is not configured!"
end

Visa fil

@ -1,2 +1,11 @@
# -*-Conf-*-
XBPS_CHROOT_CMD=uunshare
XBPS_ALLOW_CHROOT_BREAKOUT=no
XBPS_CFLAGS="-O3 -pipe -march=native"
XBPS_CXXFLAGS="${XBPS_CFLAGS}"
XBPS_MAKEJOBS=12
XBPS_ALLOW_RESTRICTED=yes
## EOF

31
fish/chroot Normal file
Visa fil

@ -0,0 +1,31 @@
#!/usr/bin/env fish
function devrt-recreate
echo "Ensure that you have committed any changes to the devrt that you need to before recreating."
echo "Type 'ok' to continue, or anything else to exit."
if test (read) != "ok"
exit 1
end
rm -rf $_agw_dir_dev
tar -xJf $_agw_dir_bin/dev-base.latest.tar.xz
xbps-uunshare -- $_agw_dir_dev /setup.sh
end
function devrt-commit
pushd ~
set lf $_agw_dir_bin/dev-base.latest.tar.xz
set nf $_agw_dir_bin/dev-base.(stat -c %Y $lf).tar.xz
mv $lf $nf
tar -Ipixz -cf $lf (string replace ~/ "" -- $_agw_dir_dev)
popd
end
function devrt
xbps-uunshare \
-b $_agw_dir_rc:/home/marrub/rc \
-b $_agw_dir_src:/home/marrub/src \
-b $_agw_dir_bin:/home/marrub/bin \
-- $_agw_dir_dev /usr/bin/env _agw_chroot=1 /usr/bin/fish -l -i -C cd
end
## EOF

Visa fil

@ -4,12 +4,18 @@ function fish_prompt
set _stat $status
echo -n (set_color 70a9ff)(date +%H:%M:%S)
echo -n (set_color normal)(
if test $_stat -eq 0
echo '@'
else
echo '!'
end)
echo -n (set_color c792ea)$hostname
if test $_stat -eq 0
echo '@'
else
echo '!'
end)
echo -n (
if test $_agw_chroot
set_color f54f4c
else
set_color c792ea
end)$hostname
echo (set_color normal)"% "
end