diff --git a/patch.sh b/patch.sh index de3f652cd0c43ecfdb1256a8986af905f2965f90..ba5d7e412b2b4ca9ed7f9bf939767d3ea4180281 100644 --- a/patch.sh +++ b/patch.sh @@ -140,18 +140,15 @@ aufs () { ${git_bin} format-patch -4 -o ../patches/aufs/ cd ../ - if [ ! -d ./aufs-standalone ] ; then - ${git_bin} clone -b aufs${KERNEL_REL} https://github.com/sfjro/aufs-standalone --depth=1 - cd ./aufs-standalone/ - aufs_hash=$(git rev-parse HEAD) - cd - - else + if [ -d ./aufs-standalone ] ; then rm -rf ./aufs-standalone || true - ${git_bin} clone -b aufs${KERNEL_REL} https://github.com/sfjro/aufs-standalone --depth=1 - cd ./aufs-standalone/ - aufs_hash=$(git rev-parse HEAD) - cd - fi + + ${git_bin} clone -b aufs${KERNEL_REL} https://github.com/sfjro/aufs-standalone --depth=1 + cd ./aufs-standalone/ + aufs_hash=$(git rev-parse HEAD) + cd - + cd ./KERNEL/ KERNEL_REL=6.1 @@ -192,19 +189,15 @@ wpanusb () { #regenerate="enable" if [ "x${regenerate}" = "xenable" ] ; then cd ../ - if [ ! -d ./wpanusb ] ; then - ${git_bin} clone https://github.com/statropy/wpanusb --depth=1 - cd ./wpanusb - wpanusb_hash=$(git rev-parse HEAD) - cd - - else + if [ -d ./wpanusb ] ; then rm -rf ./wpanusb || true - ${git_bin} clone https://github.com/statropy/wpanusb --depth=1 - cd ./wpanusb - wpanusb_hash=$(git rev-parse HEAD) - cd - fi + ${git_bin} clone https://github.com/statropy/wpanusb --depth=1 + cd ./wpanusb + wpanusb_hash=$(git rev-parse HEAD) + cd - + cd ./KERNEL/ cp -v ../wpanusb/wpanusb.h drivers/net/ieee802154/ @@ -236,19 +229,15 @@ bcfserial () { #regenerate="enable" if [ "x${regenerate}" = "xenable" ] ; then cd ../ - if [ ! -d ./bcfserial ] ; then - ${git_bin} clone https://github.com/statropy/bcfserial --depth=1 - cd ./bcfserial - bcfserial_hash=$(git rev-parse HEAD) - cd - - else + if [ -d ./bcfserial ] ; then rm -rf ./bcfserial || true - ${git_bin} clone https://github.com/statropy/bcfserial --depth=1 - cd ./wpanusb - bcfserial_hash=$(git rev-parse HEAD) - cd - fi + ${git_bin} clone https://github.com/statropy/bcfserial --depth=1 + cd ./bcfserial + bcfserial_hash=$(git rev-parse HEAD) + cd - + cd ./KERNEL/ cp -v ../bcfserial/bcfserial.c drivers/net/ieee802154/ @@ -306,20 +295,16 @@ wireless_regdb () { #https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/ #regenerate="enable" if [ "x${regenerate}" = "xenable" ] ; then - cd ../ - if [ ! -d ./wireless-regdb ] ; then - ${git_bin} clone git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git --depth=1 - cd ./wireless-regdb - wireless_regdb_hash=$(git rev-parse HEAD) - cd - - else + if [ -d ./wireless-regdb ] ; then rm -rf ./wireless-regdb || true - ${git_bin} clone git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git --depth=1 - cd ./wireless-regdb - wireless_regdb_hash=$(git rev-parse HEAD) - cd - fi + + ${git_bin} clone git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git --depth=1 + cd ./wireless-regdb + wireless_regdb_hash=$(git rev-parse HEAD) + cd - + cd ./KERNEL/ mkdir -p ./firmware/ || true @@ -353,18 +338,15 @@ ti_pm_firmware () { if [ "x${regenerate}" = "xenable" ] ; then cd ../ - if [ ! -d ./ti-amx3-cm3-pm-firmware ] ; then - ${git_bin} clone -b ti-v4.1.y git://git.ti.com/processor-firmware/ti-amx3-cm3-pm-firmware.git --depth=1 - cd ./ti-amx3-cm3-pm-firmware - ti_amx3_cm3_hash=$(git rev-parse HEAD) - cd - - else + if [ -d ./ti-amx3-cm3-pm-firmware ] ; then rm -rf ./ti-amx3-cm3-pm-firmware || true - ${git_bin} clone -b ti-v4.1.y git://git.ti.com/processor-firmware/ti-amx3-cm3-pm-firmware.git --depth=1 - cd ./ti-amx3-cm3-pm-firmware - ti_amx3_cm3_hash=$(git rev-parse HEAD) - cd - fi + + ${git_bin} clone -b ti-v4.1.y git://git.ti.com/processor-firmware/ti-amx3-cm3-pm-firmware.git --depth=1 + cd ./ti-amx3-cm3-pm-firmware + ti_amx3_cm3_hash=$(git rev-parse HEAD) + cd - + cd ./KERNEL/ mkdir -p ./firmware/ || true @@ -409,18 +391,15 @@ beagleboard_dtbs () { #regenerate="enable" if [ "x${regenerate}" = "xenable" ] ; then cd ../ - if [ ! -d ./${work_dir} ] ; then - ${git_bin} clone -b ${branch} ${https_repo} --depth=1 - cd ./${work_dir} - git_hash=$(git rev-parse HEAD) - cd - - else + if [ -d ./${work_dir} ] ; then rm -rf ./${work_dir} || true - ${git_bin} clone -b ${branch} ${https_repo} --depth=1 - cd ./${work_dir} - git_hash=$(git rev-parse HEAD) - cd - fi + + ${git_bin} clone -b ${branch} ${https_repo} --depth=1 + cd ./${work_dir} + git_hash=$(git rev-parse HEAD) + cd - + cd ./KERNEL/ cleanup_dts_builds