dockerutils/alpine-pkg-tag.sh

7 lines
175 B
Bash
Raw Normal View History

2022-06-20 00:48:14 +00:00
#!/bin/sh
PKG_NAME=$1
2022-06-20 01:24:16 +00:00
apk add $PKG_NAME
2022-06-20 01:07:31 +00:00
VER=$(apk version $PKG_NAME | grep $PKG_NAME | sed -e "s/$PKG_NAME-\(.*\)\s*=.*/\1/" | awk '{$1=$1};1')
2022-06-20 00:48:14 +00:00
echo -n "$VER,latest" > .tags