Forked from ejona86/list-user-installed-packages.sh
Created
December 28, 2020 07:35
-
-
Save moonman/1e411b2a222c7d878ab7c8b2de987105 to your computer and use it in GitHub Desktop.
List user-installed packages on LEDE
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 | |
FLASH_TIME="$(awk ' | |
$1 == "Installed-Time:" && ($2 < OLDEST || OLDEST=="") { | |
OLDEST=$2 | |
} | |
END { | |
print OLDEST | |
} | |
' /usr/lib/opkg/status)" | |
awk -v FT="$FLASH_TIME" ' | |
$1 == "Package:" { | |
PKG=$2 | |
USR="" | |
} | |
$1 == "Status:" && $3 ~ "user" { | |
USR=1 | |
} | |
$1 == "Installed-Time:" && USR && $2 != FT { | |
print PKG | |
} | |
' /usr/lib/opkg/status | sort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment