Automatically find debcargo
Ximin Luo
5 years ago
0 | 0 |
Instructions
|
1 | 1 |
============
|
|
2 |
|
|
3 |
``cargo install debcargo``, then for each new package:
|
2 | 4 |
|
3 | 5 |
Run ``./update.sh <rust-crate-name>`` and follow its instructions.
|
4 | 6 |
|
5 | 7 |
(The above applies even for new Rust Debian packages.)
|
6 | 8 |
|
7 | |
For now, the script assumes you cloned and built debcargo in ``../debcargo``,
|
8 | |
so do that once before you run it.
|
9 | |
|
10 | 9 |
|
11 | 10 |
TODO
|
12 | 11 |
====
|
13 | 12 |
|
14 | |
maybe use --copyright-guess-harder
|
|
13 |
Maybe use ``--copyright-guess-harder``.
|
1 | 1 |
|
2 | 2 |
abort() { local x=$1; shift; echo >&2 "$0: abort: $@"; exit "$x"; }
|
3 | 3 |
|
4 | |
DEBCARGO_GIT=${DEBCARGO_GIT:-$PWD/../debcargo}
|
5 | |
DEBCARGO=${DEBCARGO:-$DEBCARGO_GIT/target/debug/debcargo}
|
|
4 |
if [ -n "$DEBCARGO" ]; then
|
|
5 |
true
|
|
6 |
elif which debcargo >/dev/null; then
|
|
7 |
DEBCARGO=$(which debcargo)
|
|
8 |
elif [ -f "$HOME/.cargo/bin/debcargo" ]; then
|
|
9 |
DEBCARGO="$HOME/.cargo/bin/debcargo"
|
|
10 |
else
|
|
11 |
abort 1 "debcargo not found, run \`cargo install debcargo\` or set DEBCARGO to point to it"
|
|
12 |
fi
|
|
13 |
|
|
14 |
test -x "$DEBCARGO" || abort 1 "debcargo found but not executable: $DEBCARGO"
|
|
15 |
|
6 | 16 |
PKG="$1"
|
7 | 17 |
VER="$2"
|
8 | 18 |
|