Skip to content

Commit

Permalink
chore/refactor: mikrotik build #28
Browse files Browse the repository at this point in the history
  • Loading branch information
neoFelhz committed May 15, 2018
1 parent 95f80db commit b48cef3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 14 additions & 6 deletions _build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b48cef3

Please sign in to comment.