reloc: stop removing entire $BUILDDIR

We found that user can mistakenly break system with --builddir option,
something like './reloc/build_deb.sh --builddir /'.
To avoid that we need to stop removing entire $BUILDDIR, remove
directories only we have to clean up before building deb package.

See: https://github.com/scylladb/scylla-python3/pull/23#discussion_r707088453

Closes #177
This commit is contained in:
Takuya ASADA 2021-09-13 23:45:52 +09:00 committed by Nadav Har'El
parent 658818b2d0
commit 5c383b641b
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ while [ $# -gt 0 ]; do
done
RELOC_PKG=$(readlink -f $RELOC_PKG)
rm -rf "$BUILDDIR"
rm -rf "$BUILDDIR"/scylla-package "$BUILDDIR"/scylla-package.orig "$BUILDDIR"/debian
mkdir -p "$BUILDDIR"/scylla-package
tar -C "$BUILDDIR"/scylla-package -xpf $RELOC_PKG
cd "$BUILDDIR"/scylla-package