mirror of
https://github.com/Kron4ek/Conty
synced 2024-12-27 09:58:25 +01:00
Add an argument to list installed packages
This commit is contained in:
parent
3b3b00e3c4
commit
4f1cdfd9fd
2 changed files with 12 additions and 2 deletions
|
@ -12,7 +12,7 @@ if [ $EUID = 0 ] && [ -z "$ALLOW_ROOT" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
script_version="1.16.1"
|
script_version="1.17"
|
||||||
|
|
||||||
# Full path to the script
|
# Full path to the script
|
||||||
script_literal="${BASH_SOURCE[0]}"
|
script_literal="${BASH_SOURCE[0]}"
|
||||||
|
@ -43,7 +43,7 @@ mount_point="${working_dir}"/mnt
|
||||||
# a problem with mounting the image due to an incorrectly calculated offset.
|
# a problem with mounting the image due to an incorrectly calculated offset.
|
||||||
|
|
||||||
# The size of this script
|
# The size of this script
|
||||||
scriptsize=29176
|
scriptsize=29367
|
||||||
|
|
||||||
# The size of the utils.tar.gz archive
|
# The size of the utils.tar.gz archive
|
||||||
# utils.tar.gz contains bwrap, squashfuse and dwarfs binaries
|
# utils.tar.gz contains bwrap, squashfuse and dwarfs binaries
|
||||||
|
@ -71,6 +71,7 @@ if [ "$1" = "--help" ] || [ "$1" = "-h" ] || ([ -z "$1" ] && [ ! -L "${script_li
|
||||||
echo -e "-v \tShow version of this script"
|
echo -e "-v \tShow version of this script"
|
||||||
echo -e "-e \tExtract the image"
|
echo -e "-e \tExtract the image"
|
||||||
echo -e "-o \tShow the image offset"
|
echo -e "-o \tShow the image offset"
|
||||||
|
echo -e "-l \tShow a list of all installed packages"
|
||||||
echo -e "-m \tMount/unmount the image"
|
echo -e "-m \tMount/unmount the image"
|
||||||
echo -e "\tThe image will be mounted if it's not mounted, and unmounted otherwise."
|
echo -e "\tThe image will be mounted if it's not mounted, and unmounted otherwise."
|
||||||
echo -e "\tMount point can be changed with the BASE_DIR env variable"
|
echo -e "\tMount point can be changed with the BASE_DIR env variable"
|
||||||
|
@ -826,6 +827,12 @@ if [ "$(ls "${mount_point}" 2>/dev/null)" ] || \
|
||||||
|
|
||||||
export CUSTOM_PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/lib/jvm/default/bin:/usr/local/bin:/usr/local/sbin:${PATH}"
|
export CUSTOM_PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/lib/jvm/default/bin:/usr/local/bin:/usr/local/sbin:${PATH}"
|
||||||
|
|
||||||
|
if [ "$1" = "-l" ]; then
|
||||||
|
run_bwrap --ro-bind "${mount_point}"/var /var \
|
||||||
|
bash -c "pacman -Qn; pacman -Qm"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
# If SANDBOX_LEVEL is 3, run Xephyr and openbox before running applications
|
# If SANDBOX_LEVEL is 3, run Xephyr and openbox before running applications
|
||||||
if [ "${SANDBOX}" = 1 ] && [ -n "${SANDBOX_LEVEL}" ] && [ "${SANDBOX_LEVEL}" -ge 3 ]; then
|
if [ "${SANDBOX}" = 1 ] && [ -n "${SANDBOX_LEVEL}" ] && [ "${SANDBOX_LEVEL}" -ge 3 ]; then
|
||||||
if [ -f "${mount_point}"/usr/bin/Xephyr ]; then
|
if [ -f "${mount_point}"/usr/bin/Xephyr ]; then
|
||||||
|
|
|
@ -186,6 +186,9 @@ run_in_chroot pacman --noconfirm --needed -S ${packagelist}
|
||||||
|
|
||||||
run_in_chroot locale-gen
|
run_in_chroot locale-gen
|
||||||
|
|
||||||
|
# Generate a list of installed packages
|
||||||
|
run_in_chroot pacman -Qn > "${bootstrap}"/pkglist.x86_64.txt
|
||||||
|
|
||||||
unmount_chroot
|
unmount_chroot
|
||||||
|
|
||||||
# Clear pacman package cache
|
# Clear pacman package cache
|
||||||
|
|
Loading…
Reference in a new issue