Skip to content

Instantly share code, notes, and snippets.

@Senorsen
Created March 16, 2019 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Senorsen/2c2d9a9f7d574577b909705269b64d9b to your computer and use it in GitHub Desktop.
Save Senorsen/2c2d9a9f7d574577b909705269b64d9b to your computer and use it in GitHub Desktop.
(For OpenWrt) A hack to replace broken package versions.
#!/bin/sh
set -e
ORG=$1
NEW=$2
sed -i "s/^Package: $ORG\$/Package: $NEW/" /usr/lib/opkg/status
mv /usr/lib/opkg/info/$ORG.list /usr/lib/opkg/info/$NEW.list
echo "Success"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment