Advertisement
s243a

Find_repo_records_with_epoch

Dec 23rd, 2019
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.61 KB | None | 0 0
  1. # https://gitlab.com/sc0ttj/Pkg/merge_requests/21#note_262770355
  2. # /etc/apt/sources.list should have the following line (non-free & contrib are optional)
  3. #deb http://ftp.de.debian.org/debian buster main non-free contrib
  4. UPDATE_REPO=yes
  5. . /etc/DISTRO_SPECS
  6. #Chose a repo file to filter
  7. REPO_DB_DOC_FILE=~/Packages-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION}-main
  8. AWK_PRG=\
  9. 'BEGIN {FS="|"; OFS="|"}
  10. { if ($1 ~ /^[^|]+:[^|]+$/  ){
  11.    print $1
  12. }}'
  13.  if [ "$UPDATE_REPO" = "yes" ]; then
  14.    export PKG_KEEP_EPOCH_IN_DOC_REPO=true
  15.   pkg --repo-update
  16. fi
  17. cat $REPO_DB_DOC_FILE | awk "$AWK_PRG" #| tr "\n" " "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement