mk-sbuild: Enable debugging in the finish.sh script if --debug is used

This commit is contained in:
Marco Trevisan (Treviño) 2021-04-26 19:29:06 +02:00
parent e193c30695
commit 4e5e6efdb1

View File

@ -139,6 +139,7 @@ EATMYDATA=1
while :; do
case "$1" in
--debug)
DEBUG=1
set -x
shift
;;
@ -866,7 +867,9 @@ sudo chmod a+x "$MNT"/usr/sbin/policy-rc.d
# Create image finalization script
sudo bash -c "cat >> $MNT/finish.sh" <<EOM
#!/bin/bash
#set -x
if [ "$DEBUG" = 1 ]; then
set -x
fi
set -e
if [ -n "$proxy" ]; then
mkdir -p /etc/apt/apt.conf.d/