diff options
author | crownedgrouse <[email protected]> | 2020-04-13 02:10:06 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-04-21 11:22:25 +0200 |
commit | 89f2eca925b3f19b2409f9d0e71cf8108e5bd5eb (patch) | |
tree | 28b8ce4c45c8c3d93bf420f0dc28729f4cc417f8 | |
parent | c17d8624dbae513a66d14a244964172341123523 (diff) | |
download | erlang.mk-89f2eca925b3f19b2409f9d0e71cf8108e5bd5eb.tar.gz erlang.mk-89f2eca925b3f19b2409f9d0e71cf8108e5bd5eb.tar.bz2 erlang.mk-89f2eca925b3f19b2409f9d0e71cf8108e5bd5eb.zip |
Do minimal checks to pkg_add.sh args
-rwxr-xr-x | pkg_add.sh | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1,5 +1,18 @@ #!/bin/sh +if [ -z "$1$2$3$4$5$6" ] +then + echo "Missing arguments" 1>&2 + exit 1 +fi + +T=`echo "$1" | grep "\." | wc -l ` +if [ "$T" -eq "1" ] +then + echo "Invalid dot character in name. Considere replace by an underscore." 1>&2 + exit 1 +fi + PKG_FILE="index/$1.mk" CONTENTS="PACKAGES += $1 pkg_$1_name = $1 |