mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-19 17:53:00 +01:00
Merge pull request #514 from doraskayo/after-script-exit-on-error
Abort execution on non-0 exit status from "after" scripts
This commit is contained in:
commit
1899f7f02b
1 changed files with 5 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2024 Gábor Stefanik <netrolller.3d@gmail.com>
|
# SPDX-FileCopyrightText: 2024 Gábor Stefanik <netrolller.3d@gmail.com>
|
||||||
|
# SPDX-FileCopyrightText: 2025 Dor Askayo <dor.askayo@gmail.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
|
|
@ -10,7 +11,10 @@
|
||||||
. /steps/env
|
. /steps/env
|
||||||
|
|
||||||
if [ -d /steps/after ]; then
|
if [ -d /steps/after ]; then
|
||||||
find /steps/after -maxdepth 1 -name '*.sh' -exec bash {} \;
|
after_scripts=$(find /steps/after -maxdepth 1 -type f -name '*.sh' -printf '%f\t%p\n' | sort -k1 -n | cut -f2)
|
||||||
|
for script in $after_scripts; do
|
||||||
|
bash "$script"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${INTERACTIVE}" = True ]; then
|
if [ "${INTERACTIVE}" = True ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue