From 07ea8c695f858bdce8a05a800c8cf4b5d0a4e17e Mon Sep 17 00:00:00 2001 From: Jan Mette Date: Fri, 26 Mar 2010 19:48:44 +0000 Subject: [PATCH] --- only-up.sh | 4 +- rebuildlist-build.sh | 64 +++++++++++++++++++ ...rebuild-list.sh => rebuildlist-generate.sh | 0 repoclean-builddir.sh => repoclean-local.sh | 2 +- repoclean-repodir.sh => repoclean-remote.sh | 2 +- sync-complete.sh | 12 ++-- sync-down.sh | 2 +- sync-up-nodb.sh | 59 +++++++++++++++++ sync-up.sh | 10 +-- 9 files changed, 139 insertions(+), 16 deletions(-) create mode 100755 rebuildlist-build.sh rename gen-rebuild-list.sh => rebuildlist-generate.sh (100%) rename repoclean-builddir.sh => repoclean-local.sh (97%) rename repoclean-repodir.sh => repoclean-remote.sh (97%) create mode 100755 sync-up-nodb.sh diff --git a/only-up.sh b/only-up.sh index e6fbd1503..f239b941b 100755 --- a/only-up.sh +++ b/only-up.sh @@ -35,11 +35,11 @@ sync_up() # move new packages from $ROOT/repos/$REPO/build into thr repo dir title2 "adding new packages" - mv -v _repo/build/*.pkg.tar.gz _repo/repo/ + mv -v _repo/local/*.pkg.tar.gz _repo/remote/ # sync local -> server title2 "upload pkgs to server" - rsync -avh --progress --delay-updates _repo/repo/ $_rsync_user@$_rsync_server::$_rsync_dir + rsync -avh --progress --delay-updates _repo/remote/ $_rsync_user@$_rsync_server::$_rsync_dir } # diff --git a/rebuildlist-build.sh b/rebuildlist-build.sh new file mode 100755 index 000000000..ec7f64866 --- /dev/null +++ b/rebuildlist-build.sh @@ -0,0 +1,64 @@ +# +# setup +# +curdir=`pwd` +repodir="_repo/repo" + +_script_name="GEN REBUILD LIST" +_build_arch="$_arch" +_cur_repo=`pwd | awk -F '/' '{print $NF}'` +_needed_functions="config_handling messages" +# load functions +for subroutine in ${_needed_functions} +do + source _buildscripts/functions/${subroutine} +done + +# +# startup +# +title "${_script_name}" + +check_configs +load_configs + +if [ -z "$1" ]; then + error "Usage: $0 " + newline + exit +fi + +list="$1" +startdir=$(pwd) +packages=`cat $startdir/rebuildlist-$list.txt | grep -v "$list"` + +# pushd $list +# ../makepkg -si +# popd + +for pkg in $packages; do + pushd $pkg + ../makepkg -si + popd +done + + + + + + + + + + + + + + + + + + + + + diff --git a/gen-rebuild-list.sh b/rebuildlist-generate.sh similarity index 100% rename from gen-rebuild-list.sh rename to rebuildlist-generate.sh diff --git a/repoclean-builddir.sh b/repoclean-local.sh similarity index 97% rename from repoclean-builddir.sh rename to repoclean-local.sh index e45302e3b..c8f6df9c5 100755 --- a/repoclean-builddir.sh +++ b/repoclean-local.sh @@ -34,7 +34,7 @@ cleanup_pkgs() title2 "Cleaning build packages" title2 "running repo-clean" - repo-clean -m c -s _repo/build/ + repo-clean -m c -s _repo/local/ } # diff --git a/repoclean-repodir.sh b/repoclean-remote.sh similarity index 97% rename from repoclean-repodir.sh rename to repoclean-remote.sh index 4122fb7bf..df280a655 100755 --- a/repoclean-repodir.sh +++ b/repoclean-remote.sh @@ -34,7 +34,7 @@ cleanup_pkgs() title2 "Cleaning repo packages" title2 "running repo-clean" - repo-clean -m c -s _repo/repo/ + repo-clean -m c -s _repo/remote/ } # diff --git a/sync-complete.sh b/sync-complete.sh index 2cf43534a..2e49f8d6d 100755 --- a/sync-complete.sh +++ b/sync-complete.sh @@ -32,26 +32,26 @@ done sync_complete() { export RSYNC_PASSWORD=`echo $_rsync_pass` - rsync -avh --progress $_rsync_user@$_rsync_server::$_rsync_dir/* _repo/repo/ + rsync -avh --progress $_rsync_user@$_rsync_server::$_rsync_dir/* _repo/remote/ # move new packages from $ROOT/repos/$REPO/build into thr repo dir title2 "adding new packages" - mv -v _repo/build/*.pkg.* _repo/repo/ + mv -v _repo/local/*.pkg.* _repo/remote/ # run repo-clean on it title2 "running repo-clean" - repo-clean -m c -s _repo/repo/ + repo-clean -m c -s _repo/remote/ # create new pacman database title2 "creating pacman database" - rm -rf _repo/repo/*.db.tar.gz - pushd _repo/repo/ + rm -rf _repo/remote/*.db.tar.gz + pushd _repo/remote/ repo-add $_cur_repo.db.tar.gz *.pkg.* popd # sync local -> server title2 "sync local -> server" - rsync -avh --progress --delay-updates --delete-after _repo/repo/ $_rsync_user@$_rsync_server::$_rsync_dir + rsync -avh --progress --delay-updates --delete-after _repo/remote/ $_rsync_user@$_rsync_server::$_rsync_dir } # diff --git a/sync-down.sh b/sync-down.sh index 5237f521b..7ef409704 100755 --- a/sync-down.sh +++ b/sync-down.sh @@ -32,7 +32,7 @@ done sync_down() { export RSYNC_PASSWORD=`echo $_rsync_pass` - rsync -avh --progress $_rsync_user@$_rsync_server::$_rsync_dir/* _repo/repo/ + rsync -avh --progress $_rsync_user@$_rsync_server::$_rsync_dir/* _repo/remote/ } # diff --git a/sync-up-nodb.sh b/sync-up-nodb.sh new file mode 100755 index 000000000..f239b941b --- /dev/null +++ b/sync-up-nodb.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see + +# +# setup +# +_script_name="UPLOAD PACKAGES" +_build_arch="$_arch" +_cur_repo=`pwd | awk -F '/' '{print $NF}'` +_needed_functions="config_handling helpers messages" +# load functions +for subroutine in ${_needed_functions} +do + source _buildscripts/functions/${subroutine} +done + +# +# main +# +sync_up() +{ + export RSYNC_PASSWORD=`echo $_rsync_pass` + + # move new packages from $ROOT/repos/$REPO/build into thr repo dir + title2 "adding new packages" + mv -v _repo/local/*.pkg.tar.gz _repo/remote/ + + # sync local -> server + title2 "upload pkgs to server" + rsync -avh --progress --delay-updates _repo/remote/ $_rsync_user@$_rsync_server::$_rsync_dir +} + +# +# startup +# +title "${_script_name} - $_cur_repo" + +check_configs +load_configs + +check_rsync +check_accounts + +time sync_up + +title "All done" +newline diff --git a/sync-up.sh b/sync-up.sh index 2710631c4..c33847521 100755 --- a/sync-up.sh +++ b/sync-up.sh @@ -35,22 +35,22 @@ sync_up() # move new packages from $ROOT/repos/$REPO/build into thr repo dir title2 "adding new packages" - mv -v _repo/build/*.pkg.* _repo/repo/ + mv -v _repo/local/*.pkg.* _repo/remote/ # run repo-clean on it title2 "running repo-clean" - repo-clean -m c -s _repo/repo/ + repo-clean -m c -s _repo/remote/ # create new pacman database title2 "creating pacman database" - rm -rf _repo/repo/*.db.tar.gz - pushd _repo/repo/ + rm -rf _repo/remote/*.db.tar.* + pushd _repo/remote/ repo-add $_cur_repo.db.tar.gz *.pkg.* popd # sync local -> server title2 "sync local -> server" - rsync -avh --progress --delay-updates --delete-after _repo/repo/ $_rsync_user@$_rsync_server::$_rsync_dir + rsync -avh --progress --delay-updates --delete-after _repo/remote/ $_rsync_user@$_rsync_server::$_rsync_dir } #