| 1234567891011121314151617181920212223242526272829303132333435363738394041 | #!/usr/bin/env bashtopdir=$(readlink -nf $(dirname $0)/.. 2>/dev/null || (cd $(dirname $0)/..; pwd -P))systems=$(grep -h config target/*/sys-available/*|cut -d " " -f 2)while read arch; do	count=0	rm -rf $topdir/target/$arch/sys-enabled &&	mkdir -p $topdir/target/$arch/sys-enabled &&	cd $topdir/target/$arch/sys-enabled &&	for i in $(ls $topdir/target/$arch/sys-available/);do		cd $topdir/target/$arch/sys-enabled/ &&		ln -sf ../sys-available/$i $count-$i		count=$((count+1))	donedone <${topdir}/target/arch.lstecho '' > $topdir/target/config/Config.in.system.defaultfor j in $systems;do	system=${j#ADK_TARGET_SYSTEM_}	systemu=$(echo $system|tr '[:upper:]' '[:lower:]')	printf "config ADK_$systemu\n" >> $topdir/target/config/Config.in.system.default	printf "\tboolean\n\n" >> $topdir/target/config/Config.in.system.defaultdonecat >> $topdir/target/config/Config.in.system.default << EODconfig ADK_TARGET_SYSTEM	stringEODfor i in $systems;do	system=${i#ADK_TARGET_SYSTEM_}	systemu=$(echo $system|tr '[:upper:]' '[:lower:]')	system=$(echo $system|tr '[:upper:]_' '[:lower:]-')	system=$(echo $system|sed 's#x86-64#x86_64#')	if [ "${system%-*}" = "toolchain" -o "${system%-*}" = "qemu" -o "${system%-*}" = "vbox" -o "${system%-*}" = "aranym" ];then		printf "\tdefault \"${system%-*}\" if ADK_$systemu\n" >> $topdir/target/config/Config.in.system.default	else		printf "\tdefault \"${system}\" if ADK_$systemu\n" >> $topdir/target/config/Config.in.system.default	fidoneexit 0
 |