osi-tools/osi-mk.d/libretools.sh

34 lines
925 B
Bash
Raw Normal View History

2018-08-06 00:09:42 +00:00
#!/hint/bash
2018-08-06 04:02:37 +00:00
load_module "$(dirname -- "${BASH_SOURCE[0]}")/testuser.sh"
2018-08-06 00:09:42 +00:00
packages+=(
sudo
libretools
)
2018-08-09 19:21:56 +00:00
cache_packages+=(
base-devel
)
2018-08-06 00:09:42 +00:00
2018-08-06 01:49:45 +00:00
post_install+=(10:libretools:post_install)
2018-08-06 00:09:42 +00:00
libretools:post_install() {
local arg_mountpoint=$1
cat <<-'EOT' > "${arg_mountpoint}/etc/sudoers.d/10-libretools"
# SUDO_USERS HOSTS=(AS_USER) TAGS COMMANDS
%users ALL=(ALL) NOPASSWD: SETENV: /usr/bin/librechroot, /usr/bin/libremakepkg
EOT
mkdir -p -- "${arg_mountpoint}/testuser/.config/pacman"
cat <<-'EOT' > "${arg_mountpoint}/testuser/.config/pacman/makepkg.conf"
#!/hint/bash
PKGDEST="${LIBREHOME:-$HOME}/packages/pkgdest"
SRCDEST="${LIBREHOME:-$HOME}/packages/srcdest"
SRCPKGDEST="${LIBREHOME:-$HOME}/packages/srcpkgdest"
LOGDEST="${LIBREHOME:-$HOME}/packages/logdest"
PACKAGER="Test User <testuser@example.com>"
EOT
2018-08-10 00:22:41 +00:00
mkdir -- "$arg_mountpoint"/home/testuser/packages/{,pkgdest,srcdest,srcpkgdest,logdest}
2018-08-06 00:09:42 +00:00
}