allow periods in ship names and titles
This commit is contained in:
parent
f3545a4097
commit
e7b2d20097
2
bin/log
2
bin/log
|
@ -133,7 +133,7 @@ check_log () {
|
|||
printf "\\n Title for message %s? " "$(basename "$u" | sed 's/\.[^.]*$//')"
|
||||
read -r title
|
||||
if [ ! -z "$title" ]; then
|
||||
if printf "%s" "$title" | grep -Eq "^[A-Za-z0-9]+[A-Za-z0-9\\ \\-]*$"; then
|
||||
if printf "%s" "$title" | grep -Eq "^[A-Za-z0-9]+[A-Za-z0-9\\.\\ \\-]*$"; then
|
||||
printf "0%s - %s\\t%s\\n" "$ship" "$title" "$u" | cat - /var/gopher/listing.gophermap > "$tmp" && cat "$tmp" > /var/gopher/listing.gophermap && rm "$tmp"
|
||||
printf "\\n %s - %s .... Sent.\\n" "$(basename "$u" | sed 's/\.[^.]*$//')" "$title"
|
||||
else
|
||||
|
|
2
bin/ship
2
bin/ship
|
@ -4,7 +4,7 @@ run_user=$(id -u)
|
|||
if [ "$run_user" -eq 0 ]; then
|
||||
n="$1"
|
||||
s="$2"
|
||||
if printf "%s" "$2" | grep -Eq "^[A-Za-z0-9]+[A-Za-z0-9\\ \\-]*$"; then
|
||||
if printf "%s" "$2" | grep -Eq "^[A-Za-z0-9]+[A-Za-z0-9\\.\\ \\-]*$"; then
|
||||
if [ ! -z "$n" ]; then
|
||||
user_exists=$(id -u "${n}" 2> /dev/null)
|
||||
if [ ! -z "${user_exists}" ]; then
|
||||
|
|
Loading…
Reference in New Issue