diff --git a/dist.sh b/scripts/dist.sh similarity index 94% rename from dist.sh rename to scripts/dist.sh index 71238b1fb..7e9acfc28 100644 --- a/dist.sh +++ b/scripts/dist.sh @@ -2,6 +2,12 @@ AUTOBUILD=1 +if [ ! -f LICENSE.md ]; then + echo "This script should be run from the root of the checkout."; + echo "e.g. ./scripts/dist.sh"; + exit; +fi + if [ $# -ne 1 ] || [ $1 != "autobuild" ]; then AUTOBUILD=0 echo "=== Building standalone folders. Hit enter when each prompt is satisfied" @@ -12,7 +18,7 @@ if [ $# -ne 1 ] || [ $1 != "autobuild" ]; then echo "Have you built the python libraries? (cd renderdocui/3rdparty/ironpython/ && ./compilelibs.sh /path/to/IronPython)" read; - echo "Have you marked the git commit hash in version info? (hash_version.sh)" + echo "Have you marked the git commit hash in version info? (./scripts/hash_version.sh)" read; echo "Now compile 32-bit and 64-bit Release builds." diff --git a/hash_version.sh b/scripts/hash_version.sh similarity index 71% rename from hash_version.sh rename to scripts/hash_version.sh index 3e82f1f04..10b90f27b 100644 --- a/hash_version.sh +++ b/scripts/hash_version.sh @@ -1,5 +1,11 @@ #!/bin/bash +if [ ! -f renderdoc/data/resource.h ]; then + echo "This script should be run from the root of the checkout."; + echo "e.g. ./scripts/hash_version.sh"; + exit; +fi + GIT_HASH=`git status > /dev/null 2>&1 && git rev-parse HEAD || echo NO_GIT_COMMIT_HASH_DEFINED`; rm -f ver