diff options
author | Cem Keylan <cem@ckyln.com> | 2020-07-25 11:20:55 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-07-25 11:20:55 +0300 |
commit | 47a3723632b82a0d3caf79dbe8ada1eae60dd976 (patch) | |
tree | 2c41b08502e35378af35fcda7622d3eaab776420 /repo/kiss-cargolock-urlgen | |
parent | a80ec35b458ad1616758aff8257d42b3b51ed17e (diff) | |
download | cpt-extra-47a3723632b82a0d3caf79dbe8ada1eae60dd976.tar.gz |
rename to cpt-extra
Diffstat (limited to 'repo/kiss-cargolock-urlgen')
-rwxr-xr-x | repo/kiss-cargolock-urlgen | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/repo/kiss-cargolock-urlgen b/repo/kiss-cargolock-urlgen deleted file mode 100755 index 7d78a6a..0000000 --- a/repo/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 |