#!/bin/bashset -x# ==BEGIN# This script is used to synchronize my webrepo# with my local files if something changed# This script doesnt acceot an opts.# ==AUTHOR# Norbert Varzariu <loomsen@gmail.com>#==END_myLogin="276373-ftp"_myUrl="ftp.loomsen.org:/"_myMntPt="/webz"_myDomain="loomsen.homelinux.net"# basic sanity check:fc12-x86_64if [ ! -d "$_myMntPt" -o ! -w "$_myMntPt" ]; then echo "designated mount point isn't writable!" exit $?fi# mountIt-o uid=502 -o gid=502 -o umask=000 sshfs "$_myLogin"@"$_myUrl" "$_myMntPt"## rsync will fail cause it uses mkdir without -p## so lets make sure the destination is existsmkdir -p "$_myMntPt"/repo/{SRPMS,SPECS,RPMS{/x86_64,/noarch}}# rsync -r $HOME/rpmbuild/RPMS "$_myMntPt"/repo/rsync -r $HOME/rpmbuild/SRPMS "$_myMntPt"/repo/rsync -r $HOME/rpmbuild/SPECS "$_myMntPt"/repo/createrepo --database --unique-md-filenames --update "$_myMntPt"/repo/RPMS/x86_64createrepo --database --unique-md-filenames --update "$_myMntPt"/repo/RPMS/noarchcreaterepo --database --unique-md-filenames --update "$_myMntPt"/repo/SRPMS## Done with out update, let's clean upfusermount -u "$_myMntPt"exit $?