Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- mkdir /tmp/opkginstalled
- cp -r /rom /tmp/opkginstalled
- mkdir -p /tmp/opkginstalled/rom/var/lock
- opkg list-installed -o /tmp/opkginstalled/rom > /tmp/rom.list
- rm -rf /tmp/opkginstalled
- opkg list-installed > /tmp/all.list
- awk 'FNR==NR{a[$0]++}FNR!=NR && !a[$0]{print}' /tmp/rom.list /tmp/all.list > /tmp/custom.list
- rm -f /tmp/final.list
- OLDIFS=${IFS}
- IFS=$'\n'
- for l in $(cat /tmp/custom.list); do
- if [ $(grep $(echo $l | cut -d' ' -f1) /tmp/rom.list | wc -l) -eq 0 ]; then
- echo $l >> /tmp/final.list
- fi
- done
- IFS=${OLDIFS}
- cat /tmp/final.list
- rm /tmp/rom.list /tmp/all.list /tmp/custom.list /tmp/final.list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement