Last active
June 10, 2020 21:30
-
-
Save gargolito/96d883ffaaae6269c8894cd92e1c591c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmdeb () | |
{ | |
xIFS=$IFS; | |
IFS=' '; | |
if [[ $# -ge 1 ]]; then | |
repo=reponame; | |
if [[ $@ =~ del ]]; then | |
pkg=$(echo $@|sed 's/del//g'); | |
pkgname=${pkg/_*}; | |
pkgver=$(echo ${pkg}|cut -d_ -f2); | |
aptly repo remove reponame "${pkgname} (=${pkgver})"; | |
aptly db --verbose cleanup; | |
aptly publish -force-overwrite update -gpg-key=835547D6 xenial s3:${repo}:xenial; | |
else | |
aptly repo show -with-packages ${repo}-xenial | grep $@; | |
fi; | |
fi; | |
IFS=$xIFS | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment