]> sigrok.org Git - sigrok-util.git/blobdiff - source/new-driver
new-driver: Update templates to new API
[sigrok-util.git] / source / new-driver
index 602e98201c2e0eb8325971762fbfe532bcaa8fc6..0e2a9ce4a9a1886245a6b320a8ad3376eccca7a3 100755 (executable)
@@ -301,12 +301,12 @@ def parse_gitconfig():
 #
 
 scriptdir = os.getcwd()
-if socket.gethostname() == 'sigrok':
-    LIBSR = '/data/git/libsigrok'
-    TMPLDIR = '/data/tools/tmpl'
-else:
-    LIBSR = 'git://sigrok.org/libsigrok'
-    TMPLDIR = scriptdir
+if scriptdir.split('/')[-2:] != ['sigrok-util', 'source']:
+       print("Please call this script from the 'source' directory.")
+       sys.exit(1)
+
+LIBSR = 'git://sigrok.org/libsigrok'
+TMPLDIR = scriptdir
 
 if len(sys.argv) < 2:
     print("Usage: new-driver <name>")