Compare commits

...

1 Commits

Author SHA1 Message Date
Jani Juvan
25e6bfce2d iop: add remote references for openwrt 2023-04-12 15:16:24 +02:00
2 changed files with 28 additions and 1 deletions

View File

@@ -35,7 +35,8 @@ _iop()
iopcmds="bootstrap cfe_upgrade cfe_upgrade_latest extract_core \
feeds_update genconfig generate_tarballs install_key \
scp_changes setup_host ssh_install_key status \
update_package update_feed_branches ssh_upgrade smoketest"
update_package update_feed_branches ssh_upgrade smoketest \
add_refs"
if [ $COMP_CWORD -eq 1 ] ; then

26
iop/scripts/add_refs.sh Normal file
View File

@@ -0,0 +1,26 @@
#! /bin/bash
declare -A refs=( \
["."]="https://git.openwrt.org/openwrt/openwrt.git" \
["feeds/openwrt_luci"]="https://git.openwrt.org/project/luci.git" \
["feeds/openwrt_packages"]="https://git.openwrt.org/feed/packages.git" \
["feeds/openwrt_routing"]="https://git.openwrt.org/feed/routing.git" \
["feeds/openwrt_telephony"]="https://git.openwrt.org/feed/telephony.git" \
);
function rem_refs {
for key in "${!refs[@]}"
do
git -C "$key" remote remove openwrt
done
}
function add_refs {
for key in "${!refs[@]}"
do
git -C "$key" remote add openwrt "${refs[$key]}"
# echo "Remotes for ${key}:"
# git -C "$key" remote -v
# echo ""
done
}