#!/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

 

相关文章:

  • 2021-09-27
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2021-06-16
  • 2021-05-24
  • 2021-05-04
  • 2022-12-23
猜你喜欢
  • 2022-02-28
  • 2022-01-05
  • 2022-02-28
  • 2022-03-10
  • 2022-12-23
  • 2021-05-19
  • 2021-10-10
相关资源
相似解决方案