updated on Sun Jan 22 08:00:21 UTC 2012
[aur-mirror.git] / xarchive / xarchive.install
blob654ffe910149ae3426b7de7f22a5865349cce4c0
1 post_install() {
3     # Check to see if the user needs to know about other archive types
4     which zip &> /dev/null
5     haszip=$?
6     which unzip &> /dev/null
7     hasunzip=$?
8     which unrar &> /dev/null
9     hasunrar=$?
10     which 7z &> /dev/null
11     has7z=$?
12     which arj &> /dev/null
13     hasarj=$?
14     which bzip2 &> /dev/null
15     hasbzip=$?
17     if [ $haszip -eq 1 -o $hasunzip -eq 1 -o $hasunrar -eq 1 -o $has7z -eq 1 -o $hasarj -eq 1 -o $hasbzip -eq 1 ]; then
19         echo ">>> Certain archive types cannot be opened without the following:"
21         if [ $haszip -eq 1 -o $hasunzip -eq 1 ]; then
22             echo ">>> - for zip support, install the 'zip' and 'unzip' packages."
23         fi
25         if [ $hasunrar -eq 1 ]; then
26             echo ">>> - for rar support, install the 'unrar' package."
27         fi
29         if [ $has7z -eq 1 ]; then
30             echo ">>> - for 7zip (7z) support, install the 'p7zip' package."
31         fi
33         if [ $hasarj -eq 1 ]; then
34             echo ">>> - for arj support, install the 'arj' package."
35         fi
36         
37         if [ $hasbzip -eq 1 ]; then
38             echo ">>> - for bzip support, install the 'bzip2' package."
39         fi
40     fi
44 post_upgrade() {
45     post_install $1
48 op=$1
49 shift
50 $op $*