]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/pakfire/pakfire
Update:
[people/pmueller/ipfire-2.x.git] / src / pakfire / pakfire
1 #!/bin/bash
2 ############################################################################################
3 # Version 0.1a, Copyright (C) 2006 by IPFire.org #
4 # IPFire ist freie Software, die Sie unter bestimmten Bedingungen weitergeben dürfen. #
5 ############################################################################################
6
7 . /etc/pakfire.conf
8
9 case "$1" in
10 update)
11 . $PAKHOME/lib/get_mirror.sh
12 . $PAKHOME/lib/get_list.sh
13 . $PAKHOME/lib/check_pak.sh
14 get_mirror
15 get_list
16 check_pak
17 ;;
18
19 upgrade)
20 . $PAKHOME/lib/get_upgrade.sh
21 . $PAKHOME/lib/get_base.sh
22 get_upgrade
23 get_base
24 ;;
25
26 install)
27 . $PAKHOME/lib/get_pak.sh
28 . $PAKHOME/lib/install_pak.sh
29 case "$2" in
30 "")
31 pakfire_logger "No package name given. Exiting..."
32 ;;
33 BASE-*)
34 echo $2
35 ;;
36 *)
37 if [ -e $DB_DIR/$2 ]; then
38 if [ -e $IP_DIR/$2 ]; then
39 pakfire_logger "$2 is already installed on this system."
40 else
41 get_pak $2
42 install_pak $2
43 rm -rf $TMP_DIR/*
44 fi
45 else
46 pakfire_logger "There is no paket with this name: $2"
47 fi
48 ;;
49 esac
50 ;;
51
52 clean)
53 rm -rf $CACHE_DIR/* $TMP_DIR/* $DB_DIR/*
54 ;;
55 *)
56 echo -e "IPFire - Pakfire $PAKVER:"
57 echo -e "===\t===\t===\t===\t===\t===\t===\t==="
58 echo -e "pakfire install [packet]\t- Installs a new packet."
59 echo -e "pakfire remove [paket]\t\t- Uninstalls a paket."
60 echo -e "pakfire update\t\t\t- Reloads the package list."
61 echo -e "pakfire upgrade\t\t\t- Searches for new updates."
62 echo -e "===\t===\t===\t===\t===\t===\t===\t==="
63 ;;
64
65 esac
66
67 ################################### EOF ####################################################