diff options
author | Jonathan Bauer | 2013-04-25 13:44:36 +0200 |
---|---|---|
committer | Jonathan Bauer | 2013-04-25 13:44:36 +0200 |
commit | 407488f4f4646e182cd5f473011a537bc4f10876 (patch) | |
tree | 9d46d8e98ec3f086bc3de5b1cce9d961c1a4acab /helper/fileutil.inc | |
parent | add overlayfs to kernel config (diff) | |
download | tm-scripts-407488f4f4646e182cd5f473011a537bc4f10876.tar.gz tm-scripts-407488f4f4646e182cd5f473011a537bc4f10876.tar.xz tm-scripts-407488f4f4646e182cd5f473011a537bc4f10876.zip |
start global install_package function
Diffstat (limited to 'helper/fileutil.inc')
-rw-r--r-- | helper/fileutil.inc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/helper/fileutil.inc b/helper/fileutil.inc index f4cfe298..d37d546e 100644 --- a/helper/fileutil.inc +++ b/helper/fileutil.inc @@ -9,7 +9,19 @@ else perror "Could not determine this platform's packet manager" fi -# +# install given packet through system's packet manager +install_package() { + [ $# -eq 0 ] && perror "Sanity check failed: no argument given to install_package" + local PACKAGE_LIST="$@" + for PACKAGE in $PACKAGE_LIST; do + if [ "x$PACKET_MANAGER" == "xapt" ]; then + apt-get install -y $PACKAGE + elif [ "x$PACKET_MANAGER" == "xzypper" ]; then + zypper --no-refresh install -y $PACKAGE + fi + # TODO finish... + done +} # copy list of files using tar tarcopy () { |