Skip to content

Commit

Permalink
Fix opkg.conf gpkg upgrade scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
lantis1008 committed Apr 26, 2019
1 parent 3ad8630 commit e81dc89
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions package/gpkg/files/gpkg-uci-defaults
Expand Up @@ -13,12 +13,12 @@ else
echo "dest plugin_root $plugin_root" >>/etc/opkg.conf
fi

openwrt_branch=$(cat /etc/openwrt_release | grep DISTRIB_CODENAME | sed 's/^[^\"]*\"//g; s/\".*$//g')
new_openwrt_branch_def=$( cat $gpkg_conf_template | grep -e "^src\/gz[\t ]*$openwrt_branch[\t ]")
new_gargoyle_branch_def=$(cat $gpkg_conf_template | grep -e "^src\/gz[\t ]*gargoyle[\t ]")
openwrt_branch=$(cat /etc/openwrt_release | grep DISTRIB_RELEASE | sed "s/^[^']*'//g; s/'.*$//g")
new_openwrt_branch_def=$(cat $gpkg_conf_template | grep -e "^src\/gz[\t ]*openwrt_${openwrt_branch}_")
new_gargoyle_branch_def=$(cat $gpkg_conf_template | grep -e "^src\/gz[\t ]*gargoyle.*[\t ]")
if [ -n "$new_openwrt_branch_def" ] && [ -n "$new_gargoyle_branch_def" ] ; then
sed -i '/src\/gz[\t ]*'"$openwrt_branch"'[\t ]/d' /etc/opkg.conf
sed -i '/src\/gz[\t ]*gargoyle[\t ]/d' /etc/opkg.conf
sed -i '/src\/gz[\t ]*'"openwrt_$openwrt_branch"'_/d' /etc/opkg.conf
sed -i '/src\/gz[\t ]*gargoyle.*[\t ]/d' /etc/opkg.conf
echo "$new_openwrt_branch_def" >> /etc/opkg.conf
echo "$new_gargoyle_branch_def" >> /etc/opkg.conf
fi
Expand Down
8 changes: 4 additions & 4 deletions package/gpkg/files/opkg.gpkg.tmp
@@ -1,7 +1,7 @@
src/gz %d_%v_base %U/packages/%A/base
src/gz %d_%v_packages %U/packages/%A/packages
src/gz %d_%v_routing %U/packages/%A/routing
src/gz %d_%v_telephony %U/packages/%A/telephony
src/gz %d_%V_base %U/packages/%A/base
src/gz %d_%V_packages %U/packages/%A/packages
src/gz %d_%V_routing %U/packages/%A/routing
src/gz %d_%V_telephony %U/packages/%A/telephony

src/gz gargoyle http://www.gargoyle-router.com/packages/gargoyle-%G/%T/%F
src/gz gargoyle_kernel_specific http://www.gargoyle-router.com/packages/gargoyle-%G/%T/%F_kernelspecific
Expand Down

0 comments on commit e81dc89

Please sign in to comment.