Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 66 lines (56 sloc) 2.154 kb
4d89772 Dries Verachtert ok
DriesVerachtert authored
1 #!/bin/bash
2
3 ### dar-update [ -a <archs> ] [ -d <dists> ] [ -s <sdists> ] <app> ...
4
d5aa5b9 Dag Wieers Small fixes
authored
5 source "/usr/share/dar/dar-functions"
4d89772 Dries Verachtert ok
DriesVerachtert authored
6
6c81c6d Dag Wieers Improvements to DAR related to RPMforge-extras, duplicates and RHEL6
authored
7 daropts ":a:d:qrs:" $@
4d89772 Dries Verachtert ok
DriesVerachtert authored
8 PKGS="$OPTS"
9
7dca4d2 Dag Wieers Some updates that I needed for the disttag change and fc3
authored
10 #DISTS="$DEFAULT_DISTS"
11 set_dists
4d89772 Dries Verachtert ok
DriesVerachtert authored
12
13 ### Update build environment
14 for distname in $DISTS; do
c39262d Dag Wieers Improvements to DAR for RHEL5 and LD_ASSUME_KERNEL handling.
authored
15 echo "Updating $distname."
16 if [ -r "$CONFIGDIR/dists/$distname/config" ]; then
17 source "$CONFIGDIR/dists/$distname/config"
18 else
19 warning "Configfile $CONFIGDIR/dists/$distname/config missing. Aborting."
20 continue
21 fi
22
23 if [ "$CREATE_REPO" ]; then
6c81c6d Dag Wieers Improvements to DAR related to RPMforge-extras, duplicates and RHEL6
authored
24 if [ -z "$QUIET" ]; then
25 echo "Building $distname repository in $DISTPATH."
26 fi
27 dar-metadata -q -d $distname
28 # build_tree_apt "$DISTNAME $DISTTAG" "$DISTPATH"
29 # build_repo_apt "$DISTPATH"
30 # build_repo_yum "$DISTTAG" "$DISTPATH"
c39262d Dag Wieers Improvements to DAR for RHEL5 and LD_ASSUME_KERNEL handling.
authored
31 fi
32
33 if [ "$UPDATECMD" ]; then
34 if [ -z "$FORCE_VERBOSE" ]; then
35 echo "$UPDATECMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -s
4d89772 Dries Verachtert ok
DriesVerachtert authored
36 else
c39262d Dag Wieers Improvements to DAR for RHEL5 and LD_ASSUME_KERNEL handling.
authored
37 echo "$UPDATECMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -x -s
4d89772 Dries Verachtert ok
DriesVerachtert authored
38 fi
c39262d Dag Wieers Improvements to DAR for RHEL5 and LD_ASSUME_KERNEL handling.
authored
39 fi
4d89772 Dries Verachtert ok
DriesVerachtert authored
40
c39262d Dag Wieers Improvements to DAR for RHEL5 and LD_ASSUME_KERNEL handling.
authored
41 if [ -z "$PKGS" -a "$UPGRADECMD" ]; then
42 if [ -z "$FORCE_VERBOSE" ]; then
43 echo "$UPGRADECMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -s
44 else
45 echo "$UPGRADECMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -x -s
46 fi
47 fi
48
49 if [ "$INSTALLCMD" -a "$PKGS" ]; then
50 for pkg in $PKGS; do
51 instcmd="$(echo $INSTALLCMD | sed -e "s|%p|$pkg|g")"
6c81c6d Dag Wieers Improvements to DAR related to RPMforge-extras, duplicates and RHEL6
authored
52 if [ -z "$QUIET" ]; then
53 echo "Installing $pkg in $distname."
54 fi
c39262d Dag Wieers Improvements to DAR for RHEL5 and LD_ASSUME_KERNEL handling.
authored
55 chroot $CHROOTDIR/$distname $instcmd
56 if [ -z "$FORCE_VERBOSE" ]; then
57 echo "$instcmd" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -s
58 else
59 echo "$instcmd" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -x -s
60 fi
61 done
62 fi
63 echo
4d89772 Dries Verachtert ok
DriesVerachtert authored
64 done
65 echo "Finished."
Something went wrong with that request. Please try again.