From 88668ce8b07df31ca08b057d5e9eee7edd5099f5 Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos at STUW025 Date: Mon, 14 Sep 2015 16:14:50 +0200 Subject: [PATCH] Download `git-new-workdir` for STANDALONE. + Set exec-permissions in git. + FIX standalone-creation TC. --- bin/.gitignore | 1 + bin/commit-standalone.sh | 11 ++++++++++- bin/test_standalone.sh | 8 ++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100755 bin/.gitignore diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100755 index 0000000..5886c69 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1 @@ +/git-new-workdir diff --git a/bin/commit-standalone.sh b/bin/commit-standalone.sh index b2e538f..a992941 100755 --- a/bin/commit-standalone.sh +++ b/bin/commit-standalone.sh @@ -7,10 +7,19 @@ my_dir="$(dirname "$0")" cd $my_dir/.. +git_wdir="./bin/git-new-workdir" +git_wdir_url="https://raw.githubusercontent.com/git/git/master/contrib/workdir/git-new-workdir" + +if [ ! -x "$git_wdir" ]; then + wget "$git_wdir_url" -O "$git_wdir" + chmod a+x "$git_wdir" +fi + gitversion=$(git describe --tags) rm -rf .standalone -if nwd_dump=$( git-new-workdir . .standalone standalone 2>&1 ); then +if nwd_dump=$( "$git_wdir" . .standalone standalone 2>&1 ); then ./bin/gen-standalone.py + chmod a+xr ./pypi-server-standalone.py cp -p pypi-server-standalone.py .standalone cd .standalone if [ $# -lt 1 ]; then diff --git a/bin/test_standalone.sh b/bin/test_standalone.sh index 959f0b5..bbc3679 100755 --- a/bin/test_standalone.sh +++ b/bin/test_standalone.sh @@ -3,8 +3,12 @@ my_dir="$(dirname "$0")" cd $my_dir/.. +git fetch origin standalone:origin/standalone +git branch --track standalone origin/standalone ./bin/commit-standalone.sh no_commit -./pypi-server-standalone.py & + +./pypi-server-standalone.py . & server_pid=$! sleep 2 -kill $server_pid # Killing will fail if server had failed to start. + +kill $server_pid # Killing fails if server failed starting-up.