X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=commonFunctions.bash;h=36ffa19fad613285b80585cc1a3f0f39fe278020;hb=3b7f1dd6ae9456f7d9554e3057b4a633c8d653d8;hp=0d8b897869686aabec612d2ece4a93e5f114120e;hpb=8d917b2f76db994f733059b47c20457945556281;p=nre.git diff --git a/commonFunctions.bash b/commonFunctions.bash index 0d8b897..36ffa19 100644 --- a/commonFunctions.bash +++ b/commonFunctions.bash @@ -39,3 +39,14 @@ caSign(){ # csr,ca,config,start,end echo "Signed" } +findLibfaketime() { + for candidate in /usr/lib/faketime/libfaketime.so.1 /usr/lib/*/faketime/libfaketime.so.1; do + if [[ -f "$candidate" ]]; then + printf '%s\n' "$candidate" + return + fi + done + printf >&2 'error: no libfaketime found\n' + exit 1 # unfortunately, this will only exit the $() subshell +} +