mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-08 20:41:59 +03:00
Implement upload with rename.
This commit is contained in:
parent
8cdc2bcecd
commit
8b3b9919f1
44
maint/mcsnap
44
maint/mcsnap
@ -6,11 +6,18 @@
|
|||||||
# Run this script in the directory where mc was built.
|
# Run this script in the directory where mc was built.
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# upload to .in* files, then rename.
|
|
||||||
# build tarball, select level of testing
|
# build tarball, select level of testing
|
||||||
# (dist, distcheck, warning checks)
|
# (dist, distcheck, warning checks)
|
||||||
|
|
||||||
|
|
||||||
|
# $1 - file to upload, $2 - shell mask to erase
|
||||||
|
function upload() {
|
||||||
|
echo "Uploading $1 to $SITE"
|
||||||
|
name="`basename $1`"
|
||||||
|
scp "$1" "$SITE:$DIR/.in.$name"
|
||||||
|
ssh $SITE "rm -f $DIR/$2; mv $DIR/.in.$name $DIR/$name"
|
||||||
|
}
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Version to make patches against.
|
# Version to make patches against.
|
||||||
@ -50,42 +57,15 @@ if test ! -d $MC_BASE_DIR; then
|
|||||||
fi
|
fi
|
||||||
rm -f mc-$BASE_VERSION-current.diff mc-$BASE_VERSION-current.diff.bz2
|
rm -f mc-$BASE_VERSION-current.diff mc-$BASE_VERSION-current.diff.bz2
|
||||||
|
|
||||||
# Don't bother to merge PO-files, we are skipping them in the patch
|
# Don't merge PO-files, we are skipping them in the patch
|
||||||
make distdir MSGMERGE=
|
make distdir MSGMERGE=
|
||||||
|
|
||||||
# Sometimes GNU diff returns 1 for unclear reasons
|
# Sometimes GNU diff returns 1 for unclear reasons
|
||||||
diff -urN -x po $MC_BASE_DIR mc-*/ >mc-$BASE_VERSION-current.diff || :
|
diff -urN -x po $MC_BASE_DIR mc-*/ >mc-$BASE_VERSION-current.diff || :
|
||||||
bzip2 mc-$BASE_VERSION-current.diff
|
bzip2 mc-$BASE_VERSION-current.diff
|
||||||
|
|
||||||
echo "Copying $MCTARBALL to $SITE"
|
upload "$MCTARBALL" "mc*.tar.gz"
|
||||||
scp "$MCTARBALL" "$SITE:$DIR/$MCNAME"
|
upload "$MC_RPM" "mc*.i386.rpm"
|
||||||
|
upload "$MC_PATCH" "mc*.diff.bz2"
|
||||||
# Remove old tarballs
|
|
||||||
MCFILES=`ssh $SITE ls $DIR | egrep '^mc.*\.tar\.gz' | sort | sed '$d'`
|
|
||||||
for i in $MCFILES; do
|
|
||||||
echo "Removing $i"
|
|
||||||
ssh $SITE rm -f "$DIR/$i"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Copying $MC_RPM to $SITE"
|
|
||||||
scp "$MC_RPM" "$SITE:$DIR/"
|
|
||||||
|
|
||||||
# Remove old RPM packages
|
|
||||||
MCFILES=`ssh $SITE ls $DIR | egrep '^mc.*\.rpm' | sort | sed '$d'`
|
|
||||||
for i in $MCFILES; do
|
|
||||||
echo "Removing $i"
|
|
||||||
ssh $SITE rm -f "$DIR/$i"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Copying $MC_PATCH to $SITE"
|
|
||||||
scp "$MC_PATCH" "$SITE:$DIR/"
|
|
||||||
|
|
||||||
# Remove old patches
|
|
||||||
MCFILES=`ssh $SITE ls $DIR | egrep '^mc.*\.diff\.bz2' | sort | sed '$d'`
|
|
||||||
for i in $MCFILES; do
|
|
||||||
echo "Removing $i"
|
|
||||||
ssh $SITE rm -f "$DIR/$i"
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
Loading…
Reference in New Issue
Block a user