diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rwxr-xr-x | adhocspot.sh | 17 |
3 files changed, 17 insertions, 8 deletions
@@ -1,6 +1,6 @@ pkgbase = adhocspot-script pkgdesc = Bash script to easily configure your interface to share your internet connection and configure a DHCP and DNS and TFTP boot server to listen on it. IP, DHCP, DNS can be configured, and for WiFi interfaces also wireless mode and encryption. - pkgver = 20181219.2 + pkgver = 20190514.1 pkgrel = 1 epoch = 0 install = adhocspot-script.install @@ -15,7 +15,7 @@ pkgbase = adhocspot-script source = adhocspot.sh source = copying.txt source = adhocspot-script.install - sha256sums = 66c99312050947355d984935b22a3bd40a69f0c6029d6f26dc1aa8d4d99163e7 + sha256sums = cfef5612694f371e5c4f1eb81433429e4a2db069a834fe1e72783eba69c436bf sha256sums = c3cbff25307e905545788f5c74cc137d79706c60549092f2a37919b93cf55ee3 sha256sums = f05052583b9d7ba8215897bc621fea38d18fea20e1040fcbda4fd2ab76fc8867 @@ -3,7 +3,7 @@ _pkgname=adhocspot-script pkgname="${_pkgname}" epoch=0 -pkgver=20181219.2 +pkgver=20190514.1 pkgrel=1 pkgdesc="Bash script to easily configure your interface to share your internet connection and configure a DHCP and DNS and TFTP boot server to listen on it. IP, DHCP, DNS can be configured, and for WiFi interfaces also wireless mode and encryption." arch=('any') @@ -41,7 +41,7 @@ source=( ) sha256sums=( - "66c99312050947355d984935b22a3bd40a69f0c6029d6f26dc1aa8d4d99163e7" + "cfef5612694f371e5c4f1eb81433429e4a2db069a834fe1e72783eba69c436bf" "c3cbff25307e905545788f5c74cc137d79706c60549092f2a37919b93cf55ee3" "f05052583b9d7ba8215897bc621fea38d18fea20e1040fcbda4fd2ab76fc8867" ) diff --git a/adhocspot.sh b/adhocspot.sh index 63094d972847..77d7b317dcae 100755 --- a/adhocspot.sh +++ b/adhocspot.sh @@ -1,6 +1,6 @@ #!/bin/bash -_version=20181219.2 +_version=20190514.1 ##### Dependencies. ##### # @@ -48,11 +48,20 @@ _rundir_base_default="/var/run/adhocspot" stdout() # To write to stdout. +# Options: '-n': Without trailing newline. { - if [ $# -ge 1 ]; then - cat <<< "$@" + if [ "$1" == "-n" ]; then + _fmt='%s' + shift + else + _fmt='%s\n' + fi + + if [ $# -gt 1 ]; then + errmsg "BUG: Too many arguments passed to internal function 'stdout()'". + return 12 else - cat + printf "${_fmt}" "$1" fi } |