fix envs_toot

This commit is contained in:
creme 2020-02-09 15:00:30 +00:00
parent 9da351875b
commit 0dfad1e52d
1 changed files with 13 additions and 11 deletions

View File

@ -1,8 +1,4 @@
#!/usr/bin/env sh
if [ "$(id -u)" -ne 0 ] || [ "$(id -u)" -ne 10000 ]; then
printf 'sorry only root and creme can toot as envs.\n' && exit 1
fi
#!/usr/bin/env bash
print_usage() {
printf 'usage: envs_toot "your message"\n\n'
@ -10,6 +6,8 @@ print_usage() {
exit 1
}
if [ "$(id -u)" -eq 0 ] || [ "$(id -u)" -eq 10000 ] ; then
printf 'mastodon-toot as envs.net\n\n'
if [ "$1" = '-h' ] || [ "$1" = '--help' ] || [ "$1" = '?' ]; then
@ -20,4 +18,8 @@ else
print_usage
fi
else
printf 'sorry only root and creme can toot as envs.\n' && exit 1
fi
exit 0