File: allrpms

package info (click to toggle)
xdialog 2.2.1-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,044 kB
  • ctags: 540
  • sloc: ansic: 4,985; sh: 4,525; makefile: 63; sed: 16
file content (31 lines) | stat: -rwxr-xr-x 849 bytes parent folder | download | duplicates (4)
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
29
30
31
#!/bin/sh

# Installs all RPMs found into the directory passed as parameter.

TITLE="Packages installation"

# Change the following variable to suit your system (the main
# reason for this variable is that we don't want to install
# any source RPM (.src.rpm) present into the directory):
ARCH="i?86"

# Ignore any dependency issue, overwrite any conflicting file
# and ignore previously installed packages version.
RPM_OPTIONS="--force --nodeps --oldpackage"

# This may change in the future...
RPM_LEADING_MSG_LENGTH=28
RPM_MAX_DOTS_NUMBER=50

if [ -d $1 ] ; then
	cd $1
fi

for file in *.$ARCH.rpm ; do
	( rpm -Uvh $RPM_OPTIONS $file ; sleep 1 ) | \
	Xdialog --title "$TITLE" --left \
		--progress "RPM package being installed:\n\n" 0 0 \
			   $RPM_MAX_DOTS_NUMBER $RPM_LEADING_MSG_LENGTH
done

Xdialog --title "$TITLE" --msgbox "All done !" 0 0