Created
October 9, 2017 19:24
-
-
Save kriswill/27d778647042e1444802fc055dcae166 to your computer and use it in GitHub Desktop.
Parse alpine apk package versions into a JSON blob
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
node -p "require('child_process').exec('apk info --verbose', (err, out) => { packages = {}; out.split('\n').filter(line => line.length).forEach(line => { const parts = line.split('-'); packages[parts[0]] = line.replace(parts[0]+'-', ''); }); console.log(JSON.stringify(packages, null, 2)); process.exit(0)}); '';" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment