summaryrefslogtreecommitdiffstats
path: root/linhes/linhes-dev/lh_update_db_repo.sh
blob: 3316e381c76f6c54fe4a3499240848e407a0c3b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# tiny util to regenreate the database on the LOCAL machine

if [ $# -ne 2 ]
then
    echo "incorrect number of args"
    echo "lh_update_db_repo.sh  directory  repo"
    echo "EX:  update_db_repo.sh  /data/dev/pkg_repo/x86_64/linhes-testing linhes-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.*
cd -