3 # This script takes the compiled tarball, makes an RPM package and
4 # a patch against the latest released version, then uploads
5 # everything over ssh and removes old snapshots.
6 # Run this script in the directory where mc was built.
9 # upload to .in* files, then rename.
10 # build tarball, select level of testing
11 # (dist, distcheck, warning checks)
16 # Version to make patches against.
17 # Make sure to have it unpacked in /usr/src
18 BASE_VERSION
="4.6.0-pre1"
20 # Location of the snapshot directory
21 SITE
="login.ibiblio.org"
22 DIR
="/public/ftp/pub/Linux/utils/file/managers/mc/snapshots"
24 MCVERSION
=`ls mc*.tar.gz | sort | sed -n '$s/\.tar\.gz//p'`
25 MCNAME
=mc-
`date "+%Y-%m-%d-%H" --utc`.
tar.gz
26 MCTARBALL
="$MCVERSION.tar.gz"
28 if test -z "$MCVERSION" ||
test ! -f "$MCTARBALL"; then
29 echo "No tarball found!!!"
34 MC_RPM
=`echo /usr/src/redhat/RPMS/i386/mc-*.i386.rpm`
35 if test ! -f $MC_RPM; then
36 echo "Failed to compile package!!!"
40 # Make a patch against the latest released version
41 MC_PATCH
="mc-$BASE_VERSION-current.diff.bz2"
42 if test ! -d /usr
/src
/mc-
$BASE_VERSION; then
43 echo "Cannot find unpacked base version!!!"
46 rm -f mc-
$BASE_VERSION-current.
diff mc-
$BASE_VERSION-current.
diff.bz2
48 # Don't bother to merge PO-files, we are skipping them in the patch
49 make distdir MSGMERGE
=
51 # Sometimes GNU diff returns 1 for unclear reasons
52 diff -urN -x po
/usr
/src
/mc-
$BASE_VERSION mc-
*/ >mc-
$BASE_VERSION-current.
diff ||
:
53 bzip2 mc-
$BASE_VERSION-current.
diff
55 echo "Copying $MCTARBALL to $SITE"
56 scp
"$MCTARBALL" "$SITE:$DIR/$MCNAME"
59 MCFILES
=`ssh $SITE ls $DIR | egrep '^mc.*\.tar\.gz' | sort | sed '$d'`
62 ssh $SITE rm -f "$DIR/$i"
65 echo "Copying $MC_RPM to $SITE"
66 scp
"$MC_RPM" "$SITE:$DIR/"
68 # Remove old RPM packages
69 MCFILES
=`ssh $SITE ls $DIR | egrep '^mc.*\.rpm' | sort | sed '$d'`
72 ssh $SITE rm -f "$DIR/$i"
75 echo "Copying $MC_PATCH to $SITE"
76 scp
"$MC_PATCH" "$SITE:$DIR/"
79 MCFILES
=`ssh $SITE ls $DIR | egrep '^mc.*\.diff\.bz2' | sort | sed '$d'`
82 ssh $SITE rm -f "$DIR/$i"