#!/bin/sh
#     This file is part of UPMS. 
# Copyright (c) 2016 ali abdul ghani <blade.vp2020@gmail.com>
#     UPMS is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version. 
#    UPMS is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
 
#    You should have received a copy of the GNU General Public License
#    along with UPMS.  If not, see <http://www.gnu.org/licenses/>.
if test "$1" = "-S"
then
apt-get install $2
elif test "$1" = "-Sy"
then
apt-get update
elif test "$1" = "-Sc"
then
apt-get clean
elif test "$1" = "--Qi"
then
apt-cache show $2
elif test "$1" = "-Syu"
then
apt-get update && apt-get upgrade
elif test "$1" = "-Syyu"
then
apt-get update && apt-get upgrade
elif test "$1" = "-R"
then
apt-get remove $2
elif test "$1" = "-Rs"
then
apt-get purge $2
elif test "$1" = "-Rsc"
then
apt-get purge $2
else
echo E: Invalid operation $1
fi


