Only do setcap in test.sh if necessary

This commit is contained in:
Juhani Krekelä 2019-07-16 12:34:34 +03:00
parent 6c3820c42f
commit 4be5f02d69
1 changed files with 1 additions and 1 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
LIBEXECDIR=. make &&
sudo setcap CAP_NET_RAW=ep ethermess-backend &&
test -n "$(getcap ethermess-backend)" || sudo setcap CAP_NET_RAW=ep ethermess-backend &&
./ethermess "$@"