summaryrefslogtreecommitdiffstats
path: root/make/python_launcher
diff options
context:
space:
mode:
authorKonaBlend <[email protected]>2015-10-27 17:52:39 -0400
committerBradley Sepos <[email protected]>2016-05-25 15:45:03 -0400
commit24d3dc934dbc4ec979c6376d3ed4f07607ba7bcd (patch)
tree4e0b3a7a84b919acacdf2f44010d2d4a1ac7c2bd /make/python_launcher
parentc40fd397d9058e4546fc12c0be701c183bc9867f (diff)
Build: refactor fetch for contrib tarballs
Fetch is now python-based and runs on the same version as does configure. The source script is make/fetch.py. New features: MD5 hash tracking for tarballs. Data values for all contribs added. Upon download, the file will be verified, and only then will it be moved into place inside downloads/ . Files that exist before the build system does a fetch will not be md5-checked. Multiple URLs for tarballs. Each module may specify one or more URLs and by convention the official HandBrake should be first when possible. Each URL is tried in sequence, and if it fails for any reason, the next URL is tried. If no URL succeeds, a hard-error is reported. Network fetching may be disabled via configure options. --disable-fetch will hard-error if a fetch is attempted. --accept-fetch-url=SPEC and --deny-fetch-url=SPEC offer an ACL-style mechanism using regex to match against URLs. For example, --accept-fecth-url='.*/download.handbrake.fr/.*' would skip any non-matching URLs. Build dependencies have been lightened. wget and curl are no longer required. TODO: GTK packaging should also be able to remove those deps.
Diffstat (limited to 'make/python_launcher')
-rwxr-xr-xmake/python_launcher25
1 files changed, 25 insertions, 0 deletions
diff --git a/make/python_launcher b/make/python_launcher
new file mode 100755
index 000000000..c2d9d8da0
--- /dev/null
+++ b/make/python_launcher
@@ -0,0 +1,25 @@
+#! /bin/sh
+#
+
+inpath()
+{
+ IFS=:
+ for d in $PATH
+ do
+ if [ -x $d/$1 ]; then
+ return 0
+ fi
+ done
+ return 1
+}
+
+for p in python2.7 python2.6 python2.5 python2.4 python2 python
+do
+ if ( inpath $p ); then
+ exec $p "$@"
+ exit 0
+ fi
+done
+
+echo "ERROR: no suitable version of python found."
+exit 1