diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-23 16:56:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-23 16:56:01 +0300 |
commit | 1de958f264a02998699e26ef9e81d3907f05e981 (patch) | |
tree | 4e5348acf715986ede9728902779cdf56bf81398 | |
parent | 3f30e368c070e8cb920aec2f8e179e2f21601331 (diff) | |
parent | 2150f44b9a8b36d32bdc872bd9674e21f17dd901 (diff) | |
download | spm-1de958f264a02998699e26ef9e81d3907f05e981.tar.gz spm-1de958f264a02998699e26ef9e81d3907f05e981.tar.bz2 spm-1de958f264a02998699e26ef9e81d3907f05e981.tar.xz spm-1de958f264a02998699e26ef9e81d3907f05e981.zip |
Merge branch 'master' into zlib
-rw-r--r-- | packages/sdl-jstest.sh | 6 | ||||
-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 | 45 | ||||
-rwxr-xr-x | scripts/resetsrc.sh | 9 | ||||
-rwxr-xr-x | scripts/resetsrcall.sh | 5 |
7 files changed, 62 insertions, 6 deletions
diff --git a/packages/sdl-jstest.sh b/packages/sdl-jstest.sh new file mode 100644 index 0000000..dac8139 --- /dev/null +++ b/packages/sdl-jstest.sh @@ -0,0 +1,6 @@ +SRCURL=https://github.com/Grumbel/sdl-jstest.git + +ENV_PATH="bin" +ENV_MANPATH="share/man" + +BUILD_TYPE="cmake" 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 bdc71e0..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 { @@ -301,7 +296,6 @@ function package_use { repack_paths "$ENV_LIBGL_DRIVERS_PATH" "$OVERRIDE_ENV_LIBGL_DRIVERS_PATH" "LIBGL_DRIVERS_PATH" repack_flags "$ENV_LDFLAGS_PATH" "$OVERRIDE_ENV_LDFLAGS_PATH" "LDFLAGS" "-L" repack_flags "$ENV_CPPFLAGS_PATH" "$OVERRIDE_ENV_CPPFLAGS_PATH" "CPPFLAGS" "-I" - repack_flags "$ENV_LIBGL_DRIVERS_PATH" "$OVERRIDE_ENV_LIBGL_DRIVERS_PATH" "LIBGL_DRIVERS_PATH" } function common_use_package { @@ -369,6 +363,19 @@ function common_update_source_all { unset files } +function common_reset_source_all { + cd ../src/ + check_error $? + files="*" + for package in $files + do + cd ../scripts/ + ./resetsrc.sh $package + check_error $? + done + unset files +} + function package_get_source { echo "package_get_source" run_clone "${SRCURL}" @@ -394,11 +401,37 @@ function package_update_source { fi } +function package_reset_source { + echo "package_reset_source" + cd "../src/${package}" + if [ -d .git ]; then + echo "git reset --hard HEAD" + git reset --hard HEAD + check_error $? + return + fi + if [ -d .hg ]; then + echo "hg update -C" + hg update -C + check_error $? + return + fi +} + function common_clean_destination { echo "clean ${bindir}" 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 diff --git a/scripts/resetsrc.sh b/scripts/resetsrc.sh new file mode 100755 index 0000000..05843c1 --- /dev/null +++ b/scripts/resetsrc.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +export package=$1 +source ../scripts/include/common.sh + +common_package_init + +common_run_package +package_reset_source diff --git a/scripts/resetsrcall.sh b/scripts/resetsrcall.sh new file mode 100755 index 0000000..7185785 --- /dev/null +++ b/scripts/resetsrcall.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +source ../scripts/include/common.sh + +common_reset_source_all |