summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2009-01-25 11:44:00 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2009-01-25 11:44:00 +0000
commit4b0280fb56614e1b60ac40fa3998bc9b47604ef0 (patch)
tree43790aa2f78066a8c5bc2d6847046eb8a15298ba /scripts
parent933f24146ac31656beae0e31a403a5668e80f0ee (diff)
downloadptxdist-4b0280fb56614e1b60ac40fa3998bc9b47604ef0.tar.gz
ptxdist-4b0280fb56614e1b60ac40fa3998bc9b47604ef0.tar.xz
* ptxd_make_extract.sh:
return instead of exit in case of errors git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@9631 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_make_extract.sh15
1 files changed, 7 insertions, 8 deletions
diff --git a/scripts/lib/ptxd_make_extract.sh b/scripts/lib/ptxd_make_extract.sh
index bb61f5ad0..f9218481b 100644
--- a/scripts/lib/ptxd_make_extract.sh
+++ b/scripts/lib/ptxd_make_extract.sh
@@ -24,7 +24,7 @@ ptxd_make_extract() {
local dest="${OPTARG}"
;;
*)
- exit 1
+ return 1
;;
esac
done
@@ -37,9 +37,8 @@ ptxd_make_extract() {
if [ -d "${thing}" ]; then
echo "local directory instead of tar file, linking build dir"
ln -sf "$(ptxd_abspath "${thing}")" "${packet_dir}"
- exit $?
- fi
- if [ -f "${thing}" -a -z "${packet_source}" ]; then
+ return
+ elif [ -f "${thing}" -a -z "${packet_source}" ]; then
echo
echo "Using local archive"
echo
@@ -52,7 +51,7 @@ ptxd_make_extract() {
echo
echo "Error: empty parameter to 'extract()'"
echo
- exit 1
+ return 1
fi
if [ \! -d "${dest}" ]; then
@@ -72,13 +71,13 @@ ptxd_make_extract() {
*zip)
echo "$(basename "${packet_source}")" >> "${STATEDIR}/packetlist"
unzip -q "${packet_source}" -d "${dest}"
- exit $?
+ return
;;
*)
echo
echo "Unknown format, cannot extract!"
echo
- exit 1
+ return 1
;;
esac
@@ -93,7 +92,7 @@ error: extracting '${packet_source}' failed
EOF
- exit 1
+ return 1
fi
}