aboutsummaryrefslogtreecommitdiff
path: root/kiss-cargolock-urlgen
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-05-28 16:45:43 +0300
committerCem Keylan <cem@ckyln.com>2020-05-28 16:45:43 +0300
commit1dabf5a8d511db458dd529588e57a8ed8185787a (patch)
treec5905caa9b93fa4c63ee5e8e8dbdccd53d5aca53 /kiss-cargolock-urlgen
parent7bfa97d6fa2452d0517c4f820e44033b5a50cd50 (diff)
downloadcpt-extra-1dabf5a8d511db458dd529588e57a8ed8185787a.tar.gz
added new utilities, changed repository structure20200528
Diffstat (limited to 'kiss-cargolock-urlgen')
-rwxr-xr-xkiss-cargolock-urlgen21
1 files changed, 0 insertions, 21 deletions
diff --git a/kiss-cargolock-urlgen b/kiss-cargolock-urlgen
deleted file mode 100755
index 7d78a6a..0000000
--- a/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