+++ /dev/null
-#!/bin/bash
-
-# generate a list of all available pacman packages
-
-if ! cd /var/lib/pacman/sync
-then
- if ! command -v pacman
- then
- echo "not on an arch system"
- sleep 3
- exit 1
- fi
- echo "please update your database"
- sudo pacman -Sy
-fi
-
-
-rm -rf /tmp/pacmanlist
-
-mkdir -p /tmp/pacmanlist
-cp ./*.db /tmp/pacmanlist/
-cd /tmp/pacmanlist || exit 1
-
-for i in ./*.db
-do
- if ! file "$i" | grep -q 'gzip'
- then
- echo "wrong archive type"
- continue
- fi
-
- mv "$i" "${i%.db}".tar.gz
-done
-
-rm *.db
-
-for i in ./*.tar.gz
-do
- echo "extracting $i"
- tar xvzf "$i"
-done
-
-rm ./*.tar.gz
-
-for i in ./*
-do
- if ! [ -d "$i" ]
- then
- echo "skipping $i"
- continue
- fi
- if [ -e "$i/desc" ]
- then
- echo "processing $i"
- cat "$i/desc" | grep -A 1 '%NAME%' | tail -1 >> packagelist3
- fi
-done
-
-cat packagelist3 | sort | sort -u > packagelist2
-pacman -Qq | sort | sort -u > installist
-
-comm -23 packagelist2 installist > packagelist
-sed 's/^/:g/g' installist >> packagelist
-
-mkdir -p ~/.cache/instantos
-sed -i 's/$/ /' packagelist
-cp packagelist ~/.cache/instantos/packagelist
-