Add a check_command
This commit is contained in:
parent
e162208168
commit
a973393b28
1 changed files with 8 additions and 0 deletions
|
@ -118,6 +118,14 @@ statuses_remove(){
|
||||||
$DRY_RUN || $TOOTCTL statuses remove --days "$STATUSES_REMOVE_DAYS"
|
$DRY_RUN || $TOOTCTL statuses remove --days "$STATUSES_REMOVE_DAYS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_command(){
|
||||||
|
command -v "$1" > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
for command in $TOOTCTL curl grep awk cut sort; do
|
||||||
|
check_command "$command" || (echo "$command not found, exiting..."; exit 1)
|
||||||
|
done
|
||||||
|
|
||||||
$DO_ACCOUNTS_CULL && accounts_cull
|
$DO_ACCOUNTS_CULL && accounts_cull
|
||||||
$DO_MEDIA_REMOVE && media_remove
|
$DO_MEDIA_REMOVE && media_remove
|
||||||
$DO_STATUSES_REMOVE && statuses_remove
|
$DO_STATUSES_REMOVE && statuses_remove
|
||||||
|
|
Loading…
Reference in a new issue