Created
October 21, 2017 16:35
-
-
Save ejona86/26974041ebbb3bf6602bd1bee0f92860 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