summaryrefslogtreecommitdiff
path: root/tar-clone
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2013-11-06 20:06:33 +0000
committerRichard Maw <richard.maw@gmail.com>2013-11-06 20:37:49 +0000
commit8adc9cb0b220b25692c1bce1733a7383fef062fd (patch)
tree5ea338990cea366477fc6f224c60afd91cdef302 /tar-clone
parent2c852a412d923cf71b7747e91696f94ca711ae20 (diff)
downloadtar-clone-8adc9cb0b220b25692c1bce1733a7383fef062fd.tar.bz2
Provide a workspace
Diffstat (limited to 'tar-clone')
-rwxr-xr-xtar-clone7
1 files changed, 5 insertions, 2 deletions
diff --git a/tar-clone b/tar-clone
index 7787f96..ebc21b1 100755
--- a/tar-clone
+++ b/tar-clone
@@ -1,8 +1,11 @@
-#!/bin/sh
+#!/bin/bash
# A wrapper to make tar-clone.lua behave like a normal git clone
# and deal with library paths, so lua-archive does not need to be
# installed
+set -o pipefail
+set -e
+
LUA=lua5.1
CURDIR=$(readlink -f "$(dirname "$0")")
LUA_CPATH="$CURDIR/lua-archive/?.so;$($LUA -e'print(package.cpath)')"
@@ -12,4 +15,4 @@ SOURCE="$1"
TARGET="$2"
$LUA "$CURDIR/tar-clone.lua" "$SOURCE" "$TARGET" | tar x
cd "$TARGET"
-git reset --hard HEAD
+git reset HEAD