add development chroot environment
parent
05ccdf3db0
commit
a86a935b69
|
@ -10,15 +10,18 @@ end
|
||||||
# - _agw_dir_bin = volatile binary storage
|
# - _agw_dir_bin = volatile binary storage
|
||||||
# - _agw_dir_rc = the directory holding this repository
|
# - _agw_dir_rc = the directory holding this repository
|
||||||
# - _agw_dir_src = non-volatile source code storage
|
# - _agw_dir_src = non-volatile source code storage
|
||||||
|
# - _agw_dir_dev = volatile chroot development environment
|
||||||
switch (uname)
|
switch (uname)
|
||||||
case Linux NetBSD
|
case Linux NetBSD
|
||||||
set -Ux _agw_dir_bin ~/bin
|
set -Ux _agw_dir_bin ~/bin
|
||||||
set -Ux _agw_dir_rc ~/rc
|
set -Ux _agw_dir_rc ~/rc
|
||||||
set -Ux _agw_dir_src ~/src
|
set -Ux _agw_dir_src ~/src
|
||||||
|
set -Ux _agw_dir_dev ~/dev
|
||||||
case Darwin
|
case Darwin
|
||||||
set -Ux _agw_dir_bin ~/Binaries
|
set -Ux _agw_dir_bin ~/Binaries
|
||||||
set -Ux _agw_dir_rc ~/Sources/scripts
|
set -Ux _agw_dir_rc ~/Sources/scripts
|
||||||
set -Ux _agw_dir_src ~/Sources
|
set -Ux _agw_dir_src ~/Sources
|
||||||
|
set -Ux _agw_dir_dev ~/Development
|
||||||
case \*
|
case \*
|
||||||
echo (set_color red)"This platform is not configured!"
|
echo (set_color red)"This platform is not configured!"
|
||||||
end
|
end
|
||||||
|
|
|
@ -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_MAKEJOBS=12
|
||||||
|
|
||||||
XBPS_ALLOW_RESTRICTED=yes
|
XBPS_ALLOW_RESTRICTED=yes
|
||||||
|
|
||||||
|
## EOF
|
||||||
|
|
|
@ -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
|
|
@ -9,7 +9,13 @@ function fish_prompt
|
||||||
else
|
else
|
||||||
echo '!'
|
echo '!'
|
||||||
end)
|
end)
|
||||||
echo -n (set_color c792ea)$hostname
|
|
||||||
|
echo -n (
|
||||||
|
if test $_agw_chroot
|
||||||
|
set_color f54f4c
|
||||||
|
else
|
||||||
|
set_color c792ea
|
||||||
|
end)$hostname
|
||||||
echo (set_color normal)"% "
|
echo (set_color normal)"% "
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue