You are not logged in.

#1 2014-04-06 14:47:28

Andy_Crowd
Member
From: 延雪平縣 Sweden
Registered: 2013-12-28
Posts: 119

[SOLVED]Search inside packages for future actions

Hi!

I have had some troubles when I downloaded a lot of fonts and used makefontpkg script for making installation packages for them. The problem was that all files created by makepkg was automatically moved to the predefined folder and got mixed with other packages there. Then, I decided to make a new folder for them and for an easy way to move all of the font install packages I made a script.

Here is just an example of it:

#!/bin/bash
	for InFile in *.xz ;
do GetDescription=$(tar -xOf $InFile  .PKGINFO | grep 'pkgdesc = ' | grep font | awk '{print $1}' ); 
 	if [ "x"$GetDescription !=  "x" ] ;
then 
echo This $InFile package contains "font" in the description; 
### mv $InFile ./FontInstallPackages
	fi; 
done;

I hope this will be useful for someone

Last edited by Andy_Crowd (2014-04-09 19:42:00)


Help to make Arora bug free!!
日不落 | Year 2081 | 笑傲江湖 | One more a really good book in my collection the Drystoll.

Offline

Board footer

Powered by FluxBB