summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Weitzel <j.weitzel@phytec.de>2011-09-09 12:24:33 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-09-09 12:26:27 +0200
commitcff98f977c207fe86b99927a8810a250fa5fd807 (patch)
treea75984c71007ff628184b0545579b3267c3d6560
parent13d28629cf6281e4e7b03209bdda47ca0684c8a7 (diff)
downloadptxdist-cff98f977c207fe86b99927a8810a250fa5fd807.tar.gz
ptxdist-cff98f977c207fe86b99927a8810a250fa5fd807.tar.xz
ask before cleaning complett BSP
ask user to avoid Arggghh after accidentally cleaning the complete BSP Skip asking with "--force" or "--quiet" option. Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-xbin/ptxdist8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index f60767ae6..8d2dea2f3 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -913,6 +913,14 @@ clean() {
return
fi
+ if [ ! -n "${PTX_FORCE}${PTXDIST_QUIET}" ]; then
+ read -e -p "really clean all? [y/N] " r
+ case "${r}" in
+ y|Y) ;;
+ *) exit 1 ;;
+ esac
+ fi
+
echo
echo "${PTXDIST_LOG_PROMPT}removing build directories..."
for dir in "${BUILDDIR}" "${CROSS_BUILDDIR}" "${KLIBC_BUILDDIR}" "${HOST_BUILDDIR}"; do