@@ -12,7 +12,7 @@ if [ $EUID = 0 ] && [ -z "$ALLOW_ROOT" ]; then
1212 exit 1
1313fi
1414
15- script_version=" 1.16.1 "
15+ script_version=" 1.17 "
1616
1717# Full path to the script
1818script_literal=" ${BASH_SOURCE[0]} "
@@ -43,7 +43,7 @@ mount_point="${working_dir}"/mnt
4343# a problem with mounting the image due to an incorrectly calculated offset.
4444
4545# The size of this script
46- scriptsize=29176
46+ scriptsize=29367
4747
4848# The size of the utils.tar.gz archive
4949# utils.tar.gz contains bwrap, squashfuse and dwarfs binaries
@@ -71,6 +71,7 @@ if [ "$1" = "--help" ] || [ "$1" = "-h" ] || ([ -z "$1" ] && [ ! -L "${script_li
7171 echo -e " -v \tShow version of this script"
7272 echo -e " -e \tExtract the image"
7373 echo -e " -o \tShow the image offset"
74+ echo -e " -l \tShow a list of all installed packages"
7475 echo -e " -m \tMount/unmount the image"
7576 echo -e " \tThe image will be mounted if it's not mounted, and unmounted otherwise."
7677 echo -e " \tMount point can be changed with the BASE_DIR env variable"
@@ -826,6 +827,12 @@ if [ "$(ls "${mount_point}" 2>/dev/null)" ] || \
826827
827828 export CUSTOM_PATH=" /bin:/sbin:/usr/bin:/usr/sbin:/usr/lib/jvm/default/bin:/usr/local/bin:/usr/local/sbin:${PATH} "
828829
830+ if [ " $1 " = " -l" ]; then
831+ run_bwrap --ro-bind " ${mount_point} " /var /var \
832+ bash -c " pacman -Qn; pacman -Qm"
833+ exit
834+ fi
835+
829836 # If SANDBOX_LEVEL is 3, run Xephyr and openbox before running applications
830837 if [ " ${SANDBOX} " = 1 ] && [ -n " ${SANDBOX_LEVEL} " ] && [ " ${SANDBOX_LEVEL} " -ge 3 ]; then
831838 if [ -f " ${mount_point} " /usr/bin/Xephyr ]; then
0 commit comments