iopsys-feed/iop/scripts/feeds_update.sh
Andreas Gnau aa25a78ff1 iop: feeds_update: Make dev-check check for SSH instead of non-HTTP
Similarly to 986fc5ea (Make dev-check check for SSH instead of non-HTTP,
2020-06-23), check for SSH instead of whether the repo was cloned via
HTTP. Developers might have other remotes such as OpenWrt's configured.
2021-09-14 09:57:48 +02:00

59 lines
1.3 KiB
Bash
Executable file

#! /bin/bash
function feeds_update {
developer=0
override=1
start=$(date -u +'%s');
while getopts "n" opt; do
case $opt in
n)
override=0
;;
esac
done
git remote -v | grep -qE '(git@|ssh://)' && developer=1
cp .config .genconfig_config_bak
#if -d argument is passed, clone feeds with ssh instead of http
if [ $developer == 1 ]; then
./scripts/feeds update -g
else
./scripts/feeds update
fi
./scripts/feeds update -ai
# replace core packages with iopsys versions
if [ $override == 1 ]; then
./scripts/feeds install -f -p openwrt_core -a
fi
# targets need to be installed explicitly
targets="iopsys-brcm63xx-arm iopsys-ramips intel_mips iopsys-x86 iopsys-armvirt iopsys-bcm27xx iopsys-mediatek iopsys-econet"
for target in $targets
do
rm -f target/linux/$target
./scripts/feeds install -p targets $target
done
# install all packages
./scripts/feeds install -a
# remove broken symlinks ( for packages that are no longer in the feed )
find -L package/feeds -maxdepth 2 -type l -delete
cp .genconfig_config_bak .config
make defconfig
# record when we last run this script
touch tmp/.iop_bootstrap
# always return true
exit 0
}
register_command "feeds_update" "Update feeds to point to commit hashes from feeds.conf"