So, I know my example is not a patch. It should works while apt-file doesn't recognise this option.
Is there anywhere a debian archive uncompress, where you could go to download any debian file on the debian's hierarchy ?
Sorry my poor english
apt-file-download.sh:
#!/bin/bash
FILE=$1
if [ $(apt-file search "$FILE" | tee result.txt | wc -l) -ne 1 -o $# -ne 1 ]
then
echo "Use: apt-file download file"
echo "You should specific a file from an uniq package"
rm result.txt
exit 1
fi
dir=$(mktemp -d )
mv result.txt $dir/result.txt
(cd $dir;
aptitude download $(awk -F ":" '{print $1}' result.txt)
ar xv *deb data.tar.gz
)
tar -O -zxf $dir/data.tar.gz ./$FILE > ${FILE##*/}
rm -rf $dir
# Automatically generated email from bts, devscripts version 2.10.20 # this is not a patch tags 408379 - patch
Hi, I'm not sure we should be adding this. What use cases are there for this? If you want to reinstate a lost file, couldn't you better do 'apt-get install --reinstall package'? Thijs
Ok Many times I'd like to get a file from a package just for examinate/study it, like a script in /etc/init.d, a man page, a readme from doc, a logrotate file, a config file in /etc/ ... but I don't want to install the package. Suppose you are talking via telephone with somebody you are helping with a trouble in a server who has installed a package, and in your environment you can't install this package and can't have access to another server with it. You would like just compare a file with the original and see the diff. From I openned this bug I downloaded, like an example: asterisk.logrotate phpgwaccount.schema saslauthd.conf 50unattended-upgrades Thanks you and sorry my english Thijs Kinkhorst wrote: