File: create-test-maven-repo

package info (click to toggle)
dh-clojure 0.2.0%2Bnmu1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 144 kB
  • sloc: perl: 101; makefile: 72; sh: 13
file content (23 lines) | stat: -rwxr-xr-x 616 bytes parent folder | download | duplicates (2)
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