Skip to content
Snippets Groups Projects
Unverified Commit f1e261f8 authored by Ian Douglas Scott's avatar Ian Douglas Scott
Browse files

Support downloading tar archive, instead of git repo

parent c20fed78
No related branches found
No related tags found
1 merge request!4Recipe for Lua
...@@ -48,19 +48,41 @@ function op { ...@@ -48,19 +48,41 @@ function op {
op $1 unfetch op $1 unfetch
;; ;;
fetch) fetch)
if [ ! -d build ] if [ -z "$GIT" ]
then then
git clone --recursive "$GIT" build if [ ! -f "$(basename "$SRC")" ]
then
wget "$SRC"
fi
rm -rf build
tar xvf "$(basename "$SRC")"
mv "$DIR" build
else
if [ ! -d build ]
then
git clone --recursive "$GIT" build
fi
pushd build > /dev/null
git pull
git submodule sync
git submodule update --init --recursive
popd > /dev/null
fi
if [ -f "patch" ]
then
patch -p1 -d build < patch
fi fi
pushd build > /dev/null
git pull
git submodule sync
git submodule update --init --recursive
popd > /dev/null
;; ;;
unfetch) unfetch)
rm -rfv build rm -rfv build
if [ ! -z "$SRC" ]
then
rm -f "$(basename "$SRC")"
fi
;; ;;
version) version)
pushd build > /dev/null pushd build > /dev/null
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment