filelists for packages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Thanks to Pierre, we have filelists for all packages at
http://dev.archlinux.org/~pierre/test-repo/ [1]

I made a small script which downloads the *gz from his repo
and allows one to find out which package has a particular file:

#!/bin/bash

store="$HOME/.local/share/pac-file" # default location
repos=(core extra community)
a=$(uname -m)
url="http://dev.archlinux.org/~pierre/test-repo";

if [ -f $HOME/.config/pac-file.conf ];then
	. $HOME/.config/pac-file.conf
fi


case $1 in
  sync)
	echo "synchronising file cache"
	cd $store
	for i in ${repos[@]}
	do
	    rm files.db.tar.gz
	    rm -rf $i; mkdir $i
	    wget $url/$i/os/$a/files.db.tar.gz
	    tar zxf files.db.tar.gz -C ./$i
	done
	echo "sync complete."
	;;
  search)
	cd $store
	grep -R $2 . | sed "s/\.\/\(.*\)\/files:/\1 /g"
	;;
  *)
	echo "usage: $0 {sync|search}"
esac
exit 0

Thanks Pierre!

[1]: http://archlinux.org/pipermail/arch-dev-public/2008-May/006124.html
--
Abhishek Dasgupta



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux