Commit 07ea8c69 authored by Jan Mette's avatar Jan Mette

No commit message

No commit message
parent b17e607d
......@@ -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
}
#
......
#
# 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 <rebuild list>"
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
......@@ -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/
}
#
......
......@@ -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/
}
#
......
......@@ -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
}
#
......
......@@ -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/
}
#
......
#!/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 <http://www.gnu.org/licenses/>
#
# 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
......@@ -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
}
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment