diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-18 19:39:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-18 19:39:36 +0300 |
commit | 2150f44b9a8b36d32bdc872bd9674e21f17dd901 (patch) | |
tree | 7e3ada2944141d90546cf6a5c7d48ee8570daa2f | |
parent | aca5784832b090e0220bb6677c0d85fda5c4b0df (diff) | |
download | spm-2150f44b9a8b36d32bdc872bd9674e21f17dd901.tar.gz spm-2150f44b9a8b36d32bdc872bd9674e21f17dd901.tar.bz2 spm-2150f44b9a8b36d32bdc872bd9674e21f17dd901.tar.xz spm-2150f44b9a8b36d32bdc872bd9674e21f17dd901.zip |
Clean build dir only on starting new build.
-rwxr-xr-x | scripts/build.sh | 1 | ||||
-rwxr-xr-x | scripts/buildonly.sh | 1 | ||||
-rwxr-xr-x | scripts/clean.sh | 1 | ||||
-rw-r--r-- | scripts/include/common.sh | 14 |
4 files changed, 12 insertions, 5 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index 61109a7..61f94b4 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -6,6 +6,7 @@ source ../scripts/include/common.sh common_package_init common_build_init +common_clean_builddir common_run_package package_build diff --git a/scripts/buildonly.sh b/scripts/buildonly.sh index 5a45ab8..12431da 100755 --- a/scripts/buildonly.sh +++ b/scripts/buildonly.sh @@ -6,6 +6,7 @@ source ../scripts/include/common.sh common_package_init common_build_init +common_clean_builddir common_run_package package_build diff --git a/scripts/clean.sh b/scripts/clean.sh index 347e3e8..1f56c44 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -6,6 +6,7 @@ source ../scripts/include/common.sh common_package_init common_build_init +common_clean_builddir common_run_package common_clean_destination diff --git a/scripts/include/common.sh b/scripts/include/common.sh index 4431056..9d253e6 100644 --- a/scripts/include/common.sh +++ b/scripts/include/common.sh @@ -39,11 +39,6 @@ function common_build_init { export builddir=$(realpath "${dir}/../tmp/${package}") export bindir=$(realpath "${dir}/../bin/${installname}") - - rm -rf "${builddir}" - check_error $? - mkdir -p "${builddir}" - check_error $? } function common_package_init { @@ -428,6 +423,15 @@ function common_clean_destination { rm -rf "${bindir}" } +function common_clean_builddir { + echo rm -rf "${builddir}" + rm -rf "${builddir}" + check_error $? + echo mkdir -p "${builddir}" + mkdir -p "${builddir}" + check_error $? +} + function package_build { echo "package_build" run_switch_branch |