From 842ccc1cda18a32a221371255013f8d82669c426 Mon Sep 17 00:00:00 2001 From: TomasM Date: Tue, 12 Dec 2017 06:56:31 -0500 Subject: [PATCH] readd function aliases for apt and apt-get, still needed since slax removes cache --- Slax/debian/rootcopy/root/.bashrc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Slax/debian/rootcopy/root/.bashrc b/Slax/debian/rootcopy/root/.bashrc index ece2af3..98bc99c 100644 --- a/Slax/debian/rootcopy/root/.bashrc +++ b/Slax/debian/rootcopy/root/.bashrc @@ -13,6 +13,28 @@ ls() { /bin/ls $LS_OPTIONS "$@"; } ll() { /bin/ls $LS_OPTIONS -l "$@"; } l() { /bin/ls $LS_OPTIONS -lA "$@"; } +apt-get() +{ + if [ -e /var/cache/apt/pkgcache.bin ]; then + /usr/bin/apt-get "$@" + else + /usr/bin/apt-get update + /usr/bin/apt-get "$@" + fi +} + +apt() +{ + if [ -e /var/cache/apt/pkgcache.bin ]; then + /usr/bin/apt "$@" + else + /usr/bin/apt update + /usr/bin/apt "$@" + fi +} + export -f ls export -f ll export -f l +export -f apt-get +export -f apt