From 669e4be273ac2abe9505ca6411d5ee37f1771d4c Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 26 Dec 2015 11:06:11 +0100 Subject: k 5 Reaktor/plugins: converted plugins from makefu/2/Reaktor --- krebs/5pkgs/Reaktor/scripts/random-issue.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 krebs/5pkgs/Reaktor/scripts/random-issue.sh (limited to 'krebs/5pkgs/Reaktor/scripts/random-issue.sh') 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 -- cgit v1.2.3