#!/bin/bash set -e -u show_help() { echo "This help message is useless, please read the content of /bin/pacman" exit 1 } if [ $# = 0 ]; then show_help; fi CMD="$1" shift 1 case "$CMD" in -h) show_help;; -Sy) apt-get update;; -S) apt-get install $@;; -Syu) apt-get update; apt-get upgrade;; -Q) dpkg -l $@;; -Ql) dpkg -L $@;; -Qo) dpkg -S $@;; -Ss) apt-cache search $@;; -Si) apt-cache showpkg $@;; -Rns) apt-get autoremove --purge $@;; *) echo "Unknown command: '$CMD' (run 'packages help' for usage information)";; esac