diff options
author | miefda <miefda@miefda.de> | 2015-12-30 18:24:44 +0100 |
---|---|---|
committer | miefda <miefda@miefda.de> | 2015-12-30 18:24:44 +0100 |
commit | c562e447ba927ea20bf7d2dfff9a4f4807ee4463 (patch) | |
tree | 57f5496e7acbc9dfeec7f406a6857687219625d0 /krebs/5pkgs/Reaktor/scripts/random-issue.sh | |
parent | b96fd072e1ac5e5b6b5b3e92c678dc4bb4cb7e1f (diff) | |
parent | 9b890750e24f43182ebf1732871a60d9e0c74c89 (diff) |
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'krebs/5pkgs/Reaktor/scripts/random-issue.sh')
-rw-r--r-- | krebs/5pkgs/Reaktor/scripts/random-issue.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/krebs/5pkgs/Reaktor/scripts/random-issue.sh b/krebs/5pkgs/Reaktor/scripts/random-issue.sh new file mode 100644 index 000000000..5c47c6156 --- /dev/null +++ b/krebs/5pkgs/Reaktor/scripts/random-issue.sh @@ -0,0 +1,20 @@ +#! /bin/sh +set -eu +# requires env: +# $state_dir +# $origin + +# in PATH: git,lentil,coreutils +subdir=`echo "$1" | tr -dc "[:alnum:]"` +name=`echo "$origin" | tr -dc "[:alnum:]"` +track="$state_dir/$name-checkout" +(if test -e "$track" ;then + cd "$track" + git fetch origin master + git reset --hard origin/master +else + git clone "$origin" "$track" +fi) >&2 + +cd "$track" +lentil "${subdir:-.}" -f csv | sed 1d | shuf | head -1 |