Изменил(а) на 'shell/helpers.sh'
log() added
This commit is contained in:
parent
9cb6aee0c3
commit
566424b15b
@ -12,6 +12,11 @@
|
|||||||
# Little handy helpers for scripting
|
# Little handy helpers for scripting
|
||||||
######################################
|
######################################
|
||||||
|
|
||||||
|
log() {
|
||||||
|
[ ! -d "/home/logs" ] && mkdir -p "/home/logs"
|
||||||
|
echo -e "[`date '+%H:%M:%S'`] $*" | tee -a "/home/logs/`date '+%Y%m%d'`.log"
|
||||||
|
}
|
||||||
|
|
||||||
installed() {
|
installed() {
|
||||||
command -v "$1" >/dev/null 2>&1
|
command -v "$1" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user