1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#!/bin/bash
# Create a maven repo that's suitable for testing, e.g. one we can
# write to, so that we can install the current ./dh-clojure-lein
# middleware.
set -ueo pipefail
usage() { echo 'create-test-maven-repo: SRC DEST'; }
misuse() { usage 1>&2; exit 2; }
test $# -eq 2 || misuse
src="$1"
dest="$2"
rm -rf "$dest"
cp -rs "$src" "$dest"
# If dh-clojure is installed the existing symlink will block the install
rm -f "$dest"/org/debian/dh-clojure-lein/debian/*
repo="$(realpath "$dest")"
cd ../dh-clojure-lein
export LEIN_OFFLINE=true
exec /usr/bin/lein update-in : assoc :local-repo "\"$repo\"" -- install
|