Add file with general helper functions for use by other scripts
This commit is contained in:
parent
649987a33b
commit
04d073329a
10
script/include/helper_functions.inc.sh
Normal file
10
script/include/helper_functions.inc.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# helper_functions.inc.sh: General helper functions
|
||||
|
||||
# Check pip to see if the given package is installed
|
||||
# (returns 0 if installed, 2 if not installed)
|
||||
check_pip_for () {
|
||||
return $(pip list --format=columns --disable-pip-version-check | \
|
||||
grep -Fe "${1}" >/dev/null 2>&1)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user