source: projects/self-build-setup/trunk/install-self-build-rpm.sh @ 419

Revision 419, 667 bytes checked in by munepi, 14 years ago (diff)

added self-build-setup

  • Property svn:executable set to *
RevLine 
[419]1#!/bin/bash
2
3TEXTDOMAIN=self-build-setup
4TEXTDOMAINDIR=/usr/share/locale
5
6_CACHEDIR=/var/cache/self-build
7_ARCHIVEDIR=/var/cache/apt/archives
8
9if [ ! -d $_CACHEDIR ]; then
10    exit 0
11fi
12
13if [ ! -d $_ARCHIVEDIR ]; then
14    exit 0
15fi
16
17if ! ls $_CACHEDIR | grep -e "\.rpm$" > /dev/null; then
18    exit 0
19fi
20
21echo $"Installing created and downloaded rpm packages..."
22
23if rpm -Uvh --force $_CACHEDIR/*.rpm ; then
24    mv -f $_CACHEDIR/*.rpm $_ARCHIVEDIR
25    echo $"Installation is successfully completed."
26    echo $"Installed files are moved to $_ARCHIVEDIR."
27else
28    echo $"*ERROR: can't install rpm packages."
29    echo $"rpm files are still remained in $_CACHEDIR."
30fi
31
Note: See TracBrowser for help on using the repository browser.