Skip to content

Commit 4f1cdfd

Browse files
committed
Add an argument to list installed packages
1 parent 3b3b00e commit 4f1cdfd

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

conty-start.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if [ $EUID = 0 ] && [ -z "$ALLOW_ROOT" ]; then
1212
exit 1
1313
fi
1414

15-
script_version="1.16.1"
15+
script_version="1.17"
1616

1717
# Full path to the script
1818
script_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

create-arch-bootstrap.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ run_in_chroot pacman --noconfirm --needed -S ${packagelist}
186186

187187
run_in_chroot locale-gen
188188

189+
# Generate a list of installed packages
190+
run_in_chroot pacman -Qn > "${bootstrap}"/pkglist.x86_64.txt
191+
189192
unmount_chroot
190193

191194
# Clear pacman package cache

0 commit comments

Comments
 (0)