Created
July 28, 2023 17:49
-
-
Save m000/1d42afed7dc26d511738f3655398c256 to your computer and use it in GitHub Desktop.
OpenWRT installed package list creator
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 | |
# Outputs a list of openwrt installed packages, in the same format as the one | |
# used by sysupgrade to create /etc/backup/installed_packages.txt. | |
# This can be useful to diff the currently installed packages with the packages | |
# installed during a upgrade. | |
# | |
# Based-off of sysupgrade code: | |
# https://github.com/openwrt/openwrt/blob/master/package/base-files/files/sbin/sysupgrade | |
find_extra='( | |
( -exec test -f /rom/{} ; -exec echo {} rom ; ) | |
-o ( -exec test -f /overlay/upper/{} ; -exec echo {} overlay ; ) | |
-o ( -exec echo {} unknown ; ) | |
) | |
' | |
find /usr/lib/opkg/info -name "*.control" $find_extra | sed -e 's,.*/,,;s/\.control /\t/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment