switch to nearly

This commit is contained in:
Rudra Saraswat 2023-01-26 12:35:10 +05:30
parent 5af01fbf28
commit 6b5f7f987a
7 changed files with 17 additions and 35 deletions

12
blend
View file

@ -385,13 +385,15 @@ def update_blends():
def system_update():
try:
if args.noconfirm == True:
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '--noconfirm', '-Syu'])
ret = subprocess.call(['sudo', 'nearly', 'run', '/usr/bin/pacman --noconfirm -Syu'])
else:
ret = subprocess.call(['sudo', 'almost', 'run', '/usr/bin/pacman', '-Syu'])
subprocess.call(['sudo', 'almost', 'enter', 'ro'])
exit(ret)
ret = subprocess.call(['sudo', 'nearly', 'run', '/usr/bin/pacman -Syu'])
except:
subprocess.call(['sudo', 'almost', 'enter', 'ro'])
try:
subprocess.call(['sudo', 'nearly', 'enter', 'ro'])
except KeyboardInterrupt:
error('looks like you interrupted blend. your system is currently in read-write mode')
info('run `nearly enter ro\' to enable immutability again')
exit(1)
def enter_container():

View file

@ -3,8 +3,4 @@
BLEND_COMMAND="sudo apt $@" blend enter ubuntu-22.10 --distro ubuntu-22.10
ret=$?
echo
echo -e '\033[01m\033[36m>> i: \033[0m\033[01mapps installed this way will need to be exported manually using `blend export [pkg]`,\033[0m'
echo -e '\033[01m\033[36m>> i: \033[0m\033[01mor you can run them by opening the Ubuntu-22.10 terminal (or running `blend enter -cn ubuntu-22.10`)\033[0m'
exit $ret
exit $ret

View file

@ -3,8 +3,4 @@
BLEND_COMMAND="sudo apt-get $@" blend enter ubuntu-22.10 --distro ubuntu-22.10
ret=$?
echo
echo -e '\033[01m\033[36m>> i: \033[0m\033[01mapps installed this way will need to be exported manually using `blend export [pkg]`,\033[0m'
echo -e '\033[01m\033[36m>> i: \033[0m\033[01mor you can run them by opening the Ubuntu-22.10 terminal (or running `blend enter -cn ubuntu-22.10`)\033[0m'
exit $ret
exit $ret

View file

@ -3,8 +3,4 @@
BLEND_COMMAND="sudo dnf $@" blend enter fedora-rawhide --distro fedora-rawhide
ret=$?
echo
echo -e '\033[01m\033[36m>> i: \033[0m\033[01mapps installed this way will need to be exported manually using `blend export [pkg]`,\033[0m'
echo -e '\033[01m\033[36m>> i: \033[0m\033[01mor you can run them by opening the Fedora-rawhide terminal (or running `blend enter -cn fedora-rawhide`)\033[0m'
exit $ret
exit $ret

View file

@ -1,10 +1,10 @@
#!/usr/bin/env bash
[[ -z "$SUDO_USER" ]] || {
[[ "$SUDO_USER" == root ]] || { SUDO_USER= sudo -u "$SUDO_USER" "$0" "$@"; exit $?; }
}
BLEND_COMMAND="sudo pacman $@" blend enter arch
ret=$?
echo
echo -e '\033[01m\033[36m>> i: \033[0m\033[01mapps installed this way will need to be exported manually using `blend export [pkg]`,\033[0m'
echo -e '\033[01m\033[36m>> i: \033[0m\033[01mor you can run them by opening the Arch terminal (or running `blend enter -cn arch`)\033[0m'
exit $ret
exit $ret

View file

@ -3,8 +3,4 @@
BLEND_COMMAND="yay $@" blend enter arch
ret=$?
echo
echo -e '\033[01m\033[36m>> i: \033[0m\033[01mapps installed this way will need to be exported manually using `blend export [pkg]`,\033[0m'
echo -e '\033[01m\033[36m>> i: \033[0m\033[01mor you can run them by opening the Arch terminal (or running `blend enter -cn arch`)\033[0m'
exit $ret
exit $ret

View file

@ -3,8 +3,4 @@
BLEND_COMMAND="sudo yum $@" blend enter fedora-rawhide --distro fedora-rawhide
ret=$?
echo
echo -e '\033[01m\033[36m>> i: \033[0m\033[01mapps installed this way will need to be exported manually using `blend export [pkg]`,\033[0m'
echo -e '\033[01m\033[36m>> i: \033[0m\033[01mor you can run them by opening the Fedora-rawhide terminal (or running `blend enter -cn fedora-rawhide`)\033[0m'
exit $ret
exit $ret