summaryrefslogtreecommitdiffstats
path: root/kdpkg-install/sh/kdpkg-sh
blob: e192a09310c20ce4252b758ee51f8d385de87d81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
# (C) Fabian Wuertz Feb 2008


if [ "$1" == "update" ]; then
	apt-get update
	echo ""
	echo "Done! Press enter to continuo."
	read
fi 

if [ "$1" == "install" ]; then
	if [ "$3" != "none" ]; then
		installPackage=$(echo ${3//","/" "})
		apt-get install $installPackage
	fi
	if [ "$4" != "none" ]; then
		removePackage=$(echo ${4//","/" "})
		apt-get remove $removePackage
	fi
	dpkg -i $2
	apt-get install -f
	echo ""
	echo "Done! Press enter to continuo."
	read
fi