diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..be7a550 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,20 @@ +# Crystal Maintainer: echo -n 'bWF0dEBnZXRjcnlzdC5hbA==' | base64 --decode +pkgname=pkg_warner +pkgver=1.0 +pkgrel=1 +pkgdesc="A helpful script if you use the wrong package manager" +arch=('any') +url="https://github.com/crystal-linux/pkg-warner" +license=('GPL') +provides=($pkgname) +conflicts=($pkgname) +depends=('bash') +source=('warner') +md5sums=('SKIP') + +package() { + chmod +x warner + mkdir -p ${pkgdir}/usr/bin + cp warner ${pkgdir}/usr/bin/pkg-warner + ln -s ${pkgdir}/usr/bin/{apt,apt-get,zypper,dnf,eopkg,apk} /usr/bin/pkg-warner +} \ No newline at end of file diff --git a/warner b/warner new file mode 100755 index 0000000..08d9a38 --- /dev/null +++ b/warner @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Source: https://stackoverflow.com/a/36625843 +texec=$(echo $0 $*) + +if [[ $texec == *"pkg-warner"* ]]; then + echo "This command is meant to be run via symlink" +else + echo "On Crystal, we don't use '$texec', we use 'ame'" + echo "For more specific usage information, see 'ame help'" +fi \ No newline at end of file