diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-08-16 14:59:34 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-08-19 14:34:19 +0200 |
commit | f721cc05cc09a80ecfeb80f7ae13c41db373bc74 (patch) | |
tree | 6b8d035a680c250dd3ca0c0f1cbe0b489ae7fa4d /scripts | |
parent | 852980d55c410a4d09733541450541d23cc31a45 (diff) | |
download | ptxdist-f721cc05cc09a80ecfeb80f7ae13c41db373bc74.tar.gz ptxdist-f721cc05cc09a80ecfeb80f7ae13c41db373bc74.tar.xz |
ptxd_make_world_clean: make sure ${pkg_xpkg_map} exists before using it
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/ptxd_make_world_clean.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/lib/ptxd_make_world_clean.sh b/scripts/lib/ptxd_make_world_clean.sh index 36e7711e5..e398f19d1 100644 --- a/scripts/lib/ptxd_make_world_clean.sh +++ b/scripts/lib/ptxd_make_world_clean.sh @@ -23,10 +23,12 @@ ptxd_make_world_clean() { fi if [ -n "$(ls "${ptx_state_dir}/${pkg_label}".* 2> /dev/null)" ]; then echo "Deleting stage files:" - for name in $(< "${pkg_xpkg_map}" 2>/dev/null); do - ls "${ptx_state_dir}/${name}".* - rm -f "${ptx_state_dir}/${name}".* - done + if [ -e "${pkg_xpkg_map}" ]; then + for name in $(< "${pkg_xpkg_map}"); do + ls "${ptx_state_dir}/${name}".* + rm -f "${ptx_state_dir}/${name}".* + done + fi ls "${ptx_state_dir}/${pkg_label}".* 2>/dev/null rm -f "${ptx_state_dir}/${pkg_label}".* echo |