This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ -n "$(gofmt -s -l .)" ]; then | |
| echo "Go code is not formatted:" | |
| gofmt -s -d -e . | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This tool is to make an application can run as root user, | |
| # even it is started by non-root user. | |
| # check if command run under root privilege | |
| if [ `whoami` != root ]; then | |
| echo "This command need to be run under root privilege: 'sudo runasroot file_path'" | |
| exit 1 | |
| fi |