diff options
author | merakor <cem@ckyln.com> | 2020-05-15 10:27:38 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-05-15 10:27:38 +0000 |
commit | 16d89890200d7745ef0ec1999b9098bf6eb4dabc (patch) | |
tree | 2b8a5d383e10f86163277438ea49c95bc8efaec9 /contrib/kiss-cargolock-urlgen | |
parent | d88c7c3f97baa5abbb5e7827712c99f10b82c25b (diff) | |
download | cpt-16d89890200d7745ef0ec1999b9098bf6eb4dabc.tar.gz |
contrib: move some utilities to kiss-extra
FossilOrigin-Name: 5fdd54935c99b2416dfc244cf838092ba03423c21c647d74221e65c66923b5e3
Diffstat (limited to 'contrib/kiss-cargolock-urlgen')
-rwxr-xr-x | contrib/kiss-cargolock-urlgen | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/contrib/kiss-cargolock-urlgen b/contrib/kiss-cargolock-urlgen deleted file mode 100755 index 7d78a6a..0000000 --- a/contrib/kiss-cargolock-urlgen +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Convert the given Cargo.lock file to sources - -case "$1" in - -) set -- /dev/stdin ;; - ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <Cargo.lock file>" "" \ - "'-' can be used to read from stdin." ; exit 0 -esac - -# Word splitting is intentional -# shellcheck disable=2046 -set -- $(sed '/name =/b;/version =/b;d' "$1" | - sed 's/version = /#/g;s/name = //;s/"//g' | - tr '\n' ' ' | sed 's/ #/#/g') - -# We convert the name-version seperator to '#' and back to '-' -# to avoid issues that may arise from version names with a '-' -for crate in "$@" ; do - printf 'https://static.crates.io/crates/%s/%s.crate vendor\n' \ - "${crate%#*}" "$crate" | sed 's/#/-/g' -done |