diff options
author | Karel Kočí <karel.koci@nic.cz> | 2017-01-25 15:10:08 +0100 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2017-01-25 15:10:08 +0100 |
commit | 6c7e77c842c8f7a772c8ee39e67a89703830dce7 (patch) | |
tree | 5710d0dc780be86f0173e599b92a1ab3ef66c375 | |
parent | 1998f2c043e58238304fd4a44df841752a527470 (diff) | |
download | turris-myrepo-6c7e77c842c8f7a772c8ee39e67a89703830dce7.tar.gz turris-myrepo-6c7e77c842c8f7a772c8ee39e67a89703830dce7.tar.bz2 turris-myrepo-6c7e77c842c8f7a772c8ee39e67a89703830dce7.zip |
Add echo colors and fix repo cleanup
-rwxr-xr-x | build_repo.sh | 21 | ||||
-rwxr-xr-x | clean_repo.sh | 3 |
2 files changed, 15 insertions, 9 deletions
diff --git a/build_repo.sh b/build_repo.sh index dd7f6bc..c3b0d1f 100755 --- a/build_repo.sh +++ b/build_repo.sh @@ -15,19 +15,28 @@ rm -rf .omnia-sdk rm -rf .turris-sdk if [ "$BOARD" = "omnia" ] || [ "$BOARD" = "all" ]; then - echo "Getting current SDK for omnia" + echo -e "\e[1;34mGetting current SDK for omnia\e[0m" curl "https://repo.turris.cz/omnia/OpenWrt-SDK-mvebu_gcc-4.8-linaro_musl-1.1.15_eabi.Linux-x86_64.tar.bz2" \ | tar -xjf - mv OpenWrt-SDK-mvebu_* .omnia-sdk fi if [ "$BOARD" = "turris" ] || [ "$BOARD" = "all" ]; then - echo "Getting current SDK for turris" + echo -e "\e[1;34mGetting current SDK for turris\e[0m" wget "https://repo.turris.cz/turris/OpenWrt-SDK-mpc85xx-p2020-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2" \ | tar -xjf - mv OpenWrt-SDK-mpc85xx* .turris-sdk fi -echo "Copy packages" +if [ -f CONFIG ]; then + echo -e "\e[1;34mApply CONFIG\e[0m" + ([ "$BOARD" = "omnia" ] || [ "$BOARD" = "all" ]) && \ + cat CONFIG >> .omnia-sdk/.config + ([ "$BOARD" = "turris" ] || [ "$BOARD" = "all" ]) && \ + cat CONFIG >> .turris-sdk/.config +fi + + +echo -e "\e[1;34mCopy packages\e[0m" for d in *; do [ -f $d/Makefile ] || continue [ -d .omnia-sdk ] && cp -r $d .omnia-sdk/package/ @@ -35,16 +44,16 @@ for d in *; do done if [ "$BOARD" = "omnia" ] || [ "$BOARD" = "all" ]; then - echo "Building omnia" + echo -e "\e[1;34mBuilding omnia\e[0m" (cd .omnia-sdk; make $@) fi if [ "$BOARD" = "turris" ] || [ "$BOARD" = "all" ]; then - echo "Building turris" + echo -e "\e[1;34mBuilding turris\e[0m" (cd .turris-sdk; make $@) fi deploy() { - echo "Sign and deploy $1" + echo -e "\e[1;34mSign and deploy $1\e[0m" SEC=$PWD/myrepo-cert/files/key.sec pushd .$1-sdk staging_dir/host/bin/usign -S -s $SEC -m bin/mvebu-musl/packages/base/Packages diff --git a/clean_repo.sh b/clean_repo.sh index 9d81e44..4b29d92 100755 --- a/clean_repo.sh +++ b/clean_repo.sh @@ -1,8 +1,5 @@ #!/bin/sh ssh freebsd@cynerd.cz " -set -e -set -x - rm -rf /usr/local/www/data/myrepo mkdir -p /usr/local/www/data/myrepo/turris mkdir -p /usr/local/www/data/myrepo/omnia |