Bladeren bron

add development chroot environment

master
Alison Watson 10 maanden geleden
bovenliggende
commit
a86a935b69
4 gewijzigde bestanden met toevoegingen van 55 en 6 verwijderingen
  1. +3
    -0
      applications/fish
  2. +9
    -0
      computers/cain/void-conf
  3. +31
    -0
      fish/chroot
  4. +12
    -6
      fish/prompt

+ 3
- 0
applications/fish Bestand weergeven

@@ -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


+ 9
- 0
computers/cain/void-conf Bestand weergeven

@@ -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
- 0
fish/chroot Bestand weergeven

@@ -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

+ 12
- 6
fish/prompt Bestand weergeven

@@ -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



Laden…
Annuleren
Opslaan