summaryrefslogtreecommitdiff
path: root/licensecheck
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-25 12:53:08 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-25 12:53:08 -0200
commit2ae8ce2b2e3c51c59c0dca3ddd24b21097957a22 (patch)
tree73e44c8224343ce9f0e3137084045cfcdc8c781d /licensecheck
parentd3e4dc763e3c052e2af0ba8c77a34d2d061dd8bd (diff)
downloadtools-2ae8ce2b2e3c51c59c0dca3ddd24b21097957a22.tar.gz
tools-2ae8ce2b2e3c51c59c0dca3ddd24b21097957a22.tar.bz2
tools-2ae8ce2b2e3c51c59c0dca3ddd24b21097957a22.tar.xz
tools-2ae8ce2b2e3c51c59c0dca3ddd24b21097957a22.zip
Allow an alternative syntax
Diffstat (limited to 'licensecheck')
-rwxr-xr-xlicensecheck/serverdata.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/licensecheck/serverdata.py b/licensecheck/serverdata.py
index 5ab9b7a..c60714d 100755
--- a/licensecheck/serverdata.py
+++ b/licensecheck/serverdata.py
@@ -9,6 +9,7 @@
# Initialize stuff
import subprocess
+import sys
erp=[]
# Clear previous NPC list
@@ -17,24 +18,24 @@ try:
except:
pass
+# Determine correct path
+PATH="../../server-data/npc/"
+if len(sys.argv) == 2:
+ PATH=sys.argv[1]
+
# Generate NPC list
-subprocess.call("find ../../server-data/npc/ txt > npcs.txt", shell=True)
+subprocess.call("find "+PATH+" txt > npcs.txt", shell=True)
npcs=open("npcs.txt", "r")
# Begin
-print("Checking license info for NPCs (this excludes _npcs and mapflags)")
+print("Checking license info for NPCs")
+print("Source is at: "+PATH)
for mpa in npcs:
mp=mpa.replace('\n','')
- # Skip files prefixed with _ or called mapflags
+ # Skip mapflags
if "mapflag" in mp:
continue
- if "_import" in mp:
- continue
- if "_warps" in mp:
- continue
- if "_mobs" in mp:
- continue
# Skip bad files
if not '.txt' in mp:
continue