diff --git a/.travis.yml b/.travis.yml index f3c06f6..70682d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ dist: trusty script: - chmod +x ./_build/deploy.sh - chmod +x ./_build/build.sh - - ./_build/build.sh 127.0.0.1 + - ./_build/build.sh - ./_build/deploy.sh > /dev/null notifications: webhooks: https://fathomless-fjord-24024.herokuapp.com/notify?secret=helloworld diff --git a/_build/build.sh b/_build/build.sh index 1520eab..bdbba94 100644 --- a/_build/build.sh +++ b/_build/build.sh @@ -46,18 +46,26 @@ rm ./_build/tmp/2.txt echo "Building Mikrotik Basic Shell . . ." cat ./_build/tmp/basic/hosts > ./_build/tmp/basic/1.txt -sed -e '/^:/d' ./_build/tmp/basic/1.txt > ./_build/tmp/basic/2.txt -sed -i 's|0.0.0.0 |ip dns static add address=$1 name=|g' ./_build/tmp/basic/2.txt -cat ./_build/tmp/basic/2.txt > ./_build/tmp/basic/mikrotik.sh +sed -e '/^#/d' ./_build/tmp/basic/1.txt > ./_build/tmp/basic/2.txt +sed -e '/^:/d' ./_build/tmp/basic/2.txt > ./_build/tmp/basic/3.txt +sed -e '/^127.0.0.1/d' ./_build/tmp/basic/3.txt > ./_build/tmp/basic/4.txt +sed -i 's|0.0.0.0 |ip dns static add address=127.0.0.1 name=|g' ./_build/tmp/basic/4.txt +cat ./_build/tmp/basic/4.txt > ./_build/tmp/basic/mikrotik.sh echo "Cleaning tmp . . ." rm ./_build/tmp/basic/1.txt rm ./_build/tmp/basic/2.txt +rm ./_build/tmp/basic/3.txt +rm ./_build/tmp/basic/4.txt echo "Building Mikrotik Full Shell . . ." cat ./_build/tmp/full/hosts > ./_build/tmp/full/1.txt -sed -e '/^:/d' ./_build/tmp/full/1.txt > ./_build/tmp/full/2.txt -sed -i 's|0.0.0.0 |ip dns static add address=$1 name=|g' ./_build/tmp/full/2.txt -cat ./_build/tmp/full/2.txt > ./_build/tmp/full/mikrotik.sh +sed -e '/^#/d' ./_build/tmp/full/1.txt > ./_build/tmp/full/2.txt +sed -e '/^:/d' ./_build/tmp/full/2.txt > ./_build/tmp/full/3.txt +sed -e '/^127.0.0.1/d' ./_build/tmp/full/3.txt > ./_build/tmp/full/4.txt +sed -i 's|0.0.0.0 |ip dns static add address=127.0.0.1 name=|g' ./_build/tmp/full/4.txt +cat ./_build/tmp/full/4.txt > ./_build/tmp/full/mikrotik.sh echo "Cleaning tmp . . ." rm ./_build/tmp/full/1.txt rm ./_build/tmp/full/2.txt +rm ./_build/tmp/full/3.txt +rm ./_build/tmp/full/4.txt