Skip to content

Commit

Permalink
chore/fix: mikrotik build
Browse files Browse the repository at this point in the history
  • Loading branch information
neoFelhz committed May 15, 2018
1 parent c186c3c commit 95f80db
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ dist: trusty
script:
- chmod +x ./_build/deploy.sh
- chmod +x ./_build/build.sh
- chmod +x ./_build/mikrotik.sh
- ./_build/build.sh
- ./_build/mikrotik.sh 127.0.0.1
- ./_build/build.sh 127.0.0.1
- ./_build/deploy.sh > /dev/null
notifications:
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify?secret=helloworld
20 changes: 19 additions & 1 deletion _build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,22 @@ cat ./_build/tmp/1.txt > ./_build/tmp/127.0.0.1/basic/hosts
cat ./_build/tmp/2.txt > ./_build/tmp/127.0.0.1/full/hosts
echo "Cleaning tmp . . ."
rm ./_build/tmp/1.txt
rm ./_build/tmp/2.txt
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
echo "Cleaning tmp . . ."
rm ./_build/tmp/basic/1.txt
rm ./_build/tmp/basic/2.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
echo "Cleaning tmp . . ."
rm ./_build/tmp/full/1.txt
rm ./_build/tmp/full/2.txt
17 changes: 0 additions & 17 deletions _build/mikrotik.sh

This file was deleted.

0 comments on commit 95f80db

Please sign in to comment.