5b9b75ad33
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@663 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
29 lines
618 B
Bash
Executable File
29 lines
618 B
Bash
Executable File
#!/bin/sh
|
|
cd `dirname $0`
|
|
GREP=grep
|
|
export DESTDIR=`pwd`/dep-snap
|
|
export SRCDIR=`pwd`/dep-snap-srpms
|
|
UPLOAD=0
|
|
if [ "$1" == "UPLOAD" ]; then
|
|
UPLOAD=1
|
|
fi
|
|
if [ -f /etc/redhat-release ]
|
|
then
|
|
pkg="redhat"
|
|
else
|
|
pkg="packages"
|
|
fi
|
|
|
|
#rm -rf $DESTDIR
|
|
#rm -rf $SRCDIR
|
|
if [ $UPLOAD == 0 ]; then
|
|
echo "Nothing new detected"
|
|
exit 0;
|
|
fi
|
|
createrepo $DESTDIR
|
|
cd $DESTDIR/..
|
|
export DFNAME=dep-rpms-snap.`date +%Y.%m.%d`.tar.bz2
|
|
tar jcvf $DFNAME dep-snap
|
|
scp $DFNAME jbjohnso@shell1.sf.net:/home/groups/x/xc/xcat/htdocs/yum/
|
|
ssh jbjohnso@shell1.sf.net "cd /home/groups/x/xc/xcat/htdocs/yum/; rm -rf dep-snap; tar jxvf $DFNAME"
|