summaryrefslogtreecommitdiffstats
path: root/build_tools/bin/update_db_repo.sh
blob: b95ab7cb6dfb2bcc08a7bc137f4e3c40aafe3979 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# tiny util to regenreate the databse on the LOCAL machine
# called with

if [ $# -ne 2 ]
then
    echo "incorrect number of args"
    echo "update_db_repo  directory  repo"
    echo "EX:  update_db_repo  /data/pkg_repo/i686/core-testing core-testing"
    exit 1
fi


cd $1
REPO=$2
echo " --------------------------"
echo "updating database for $REPO"
echo " --------------------------"
pwd
	#forcefully remove the old db to start clean
	rm -f $REPO.db.tar.gz
	repo-add -q $REPO.db.tar.gz *.pkg.tar.gz
cd -