Created
July 29, 2010 21:27
-
-
Save mwisnicki/499290 to your computer and use it in GitHub Desktop.
Filters INDEX file to remove entries irrelevant to package manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
# Filters INDEX file to remove entries irrelevant to package manager | |
BEGIN { | |
FS="|" | |
# descrfile|bdeps|edeps|pdeps|fdeps | |
skip="^(5|8|11|12|13)$" | |
} | |
{ | |
for (i = 1; i <= NF; i++) { | |
if (i !~ skip) printf("%s", $i) | |
printf("|") | |
} | |
print("") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# XXX removes columns instead of leaving them empty | |
cut -d\| -f 1-4,6,7,9,10 < INDEX-8 > INDEX-8.PKG | |
for c in gzip bzip2 xz; do | |
$c -vk9 INDEX-8{,.PKG} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment