[variants] Update pacman wrapper

This commit is contained in:
Dennis ten Hoove 2024-09-04 17:37:48 +02:00
parent f567be3045
commit 2deeb2645f
No known key found for this signature in database
GPG key ID: 2BA91DC2563B83D1
3 changed files with 9 additions and 9 deletions

View file

@ -1,13 +1,13 @@
#!/usr/bin/env bash
# Elevate permissions to root
[[ $EUID -eq 0 ]] || exec sudo bash $0 $@
if [[ $@ =~ (-r|--root) ]] || [[ $@ == "-Q"* ]] || [[ $@ == "-F"* ]] || [[ $LD_LIBRARY_PATH =~ (libfakeroot) ]]; then
no_check=1
fi
if [[ ! $no_check ]]; then
# Elevate permissions to root
[[ $EUID -eq 0 ]] || exec sudo bash $0 $@
# Check if the disk is ro'ed using subvolume properties
if btrfs property get / 2> /dev/null | grep -q 'ro=true'; then
cat <<- END

View file

@ -1,13 +1,13 @@
#!/usr/bin/env bash
# Elevate permissions to root
[[ $EUID -eq 0 ]] || exec sudo bash $0 $@
if [[ $@ =~ (-r|--root) ]] || [[ $@ == "-Q"* ]] || [[ $@ == "-F"* ]] || [[ $LD_LIBRARY_PATH =~ (libfakeroot) ]]; then
no_check=1
fi
if [[ ! $no_check ]]; then
# Elevate permissions to root
[[ $EUID -eq 0 ]] || exec sudo bash $0 $@
# Check if the disk is ro'ed using subvolume properties
if btrfs property get / 2> /dev/null | grep -q 'ro=true'; then
cat <<- END

View file

@ -1,13 +1,13 @@
#!/usr/bin/env bash
# Elevate permissions to root
[[ $EUID -eq 0 ]] || exec sudo bash $0 $@
if [[ $@ =~ (-r|--root) ]] || [[ $@ == "-Q"* ]] || [[ $@ == "-F"* ]] || [[ $LD_LIBRARY_PATH =~ (libfakeroot) ]]; then
no_check=1
fi
if [[ ! $no_check ]]; then
# Elevate permissions to root
[[ $EUID -eq 0 ]] || exec sudo bash $0 $@
# Check if the disk is ro'ed using subvolume properties
if btrfs property get / 2> /dev/null | grep -q 'ro=true'; then
cat <<- END