mirror of
https://github.com/nchevsky/systemrescue-zfs.git
synced 2025-12-06 07:12:01 +01:00
- call yay through a wrapper to take care of root/sudo handling - add yay-prepare to reinstall everything that was stripped for size (like /usr/include) - yay-prepare creates a yay user and sudo rights - the wrapper is installed in /usr/bin/yay, we want it to clash with yay-packages that aren't adapted to SystemRescue
24 lines
523 B
Bash
Executable file
24 lines
523 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# yay wrapper to adapt yay to SystemRescue
|
|
#
|
|
# Author: Gerd v. Egidy
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
#
|
|
# see https://www.system-rescue.org/manual/Installing_packages_from_AUR/ for details
|
|
#
|
|
|
|
if ! id yay >/dev/null 2>&1; then
|
|
echo "system not prepared for running yay yet, call 'yay-prepare'"
|
|
exit 1
|
|
fi
|
|
|
|
# escape all parameters with ${var@Q}
|
|
escArgArray=()
|
|
for arg in "$@" ; do
|
|
escArgArray+=(${arg@Q})
|
|
done
|
|
cmdstr="/usr/bin/yay-real ${escArgArray[@]}"
|
|
|
|
su -s /bin/bash yay -c "$cmdstr"
|