#!/bin/bash ######################################################################### # set variables according to source # ######################################################################### #SORCE_PRODUKT=`ls -d "${SRC}"/etc/default.Fritz* | ##*.` #so the longer one is taken instead if [ -n "$SPIMG" ]; then DEST_PRODUKT=`ls -d "${DST}"/etc/default.F*` export DEST_PRODUKT=${DEST_PRODUKT##*.} if [ ${CONFIG_PRODUKT} = "" ]; then echo "Could not find source directory: ${DST}/etc/default.F*" sleep 10 exit 1 fi fi if [ -n "$FBIMG" ]; then SORCE_PRODUKT=`ls -d "${SRC}"/etc/default.F*` export SORCE_PRODUKT=${SORCE_PRODUKT##*.} if [ ${SORCE_PRODUKT} = "" ]; then echo "Could not find source directory: ${SRC}/etc/default.F*" sleep 10 exit 1 fi fi #only used if a second source source file is needed if [ -n "$FBIMG_2" ]; then SORCE_2_PRODUKT=`ls -d "${SRC_2}"/etc/default.F*` export SORCE_2_PRODUKT=${SORCE_2_PRODUKT##*.} if [ ${SORCE_2_PRODUKT} = "" ]; then echo "Could not find destination directory: ${SRC_2}/etc/default.F*" sleep 10 exit 1 fi fi if [ "$ORI" != "y" ]; then # find the number in SORCE_PRODUKT FBMOD=${SORCE_PRODUKT##*Fritz_Box_} FBMOD=${FBMOD%%_*} export FBMOD=`echo ${FBMOD} | tr -d '[:alpha:]'` #echo "Fritz!Box firmware mod is: ${FBMOD}" fi # if environment ProductID is enforced then there is no need to move directorys export CONFIG_PRODUKT_FN=$CONFIG_PRODUKT [ "${PATCH_OEM}" == "y" ] && export CONFIG_PRODUKT=$SORCE_PRODUKT [ "${ORI}" == "y" ] && export CONFIG_PRODUKT=$DEST_PRODUKT