X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=source%2Fnew-driver;h=a93a441e67dc3d253b0d8b288ab89102bf3ebe2e;hb=28fca3a8f9e73c86d27f20065e51c69a9118a60e;hp=602e98201c2e0eb8325971762fbfe532bcaa8fc6;hpb=d51b53237f463a2fbe77d22896fb86ac21b51c21;p=sigrok-util.git diff --git a/source/new-driver b/source/new-driver index 602e982..a93a441 100755 --- a/source/new-driver +++ b/source/new-driver @@ -144,7 +144,7 @@ def do_configure_ac(gitdir): # add summary line out = '' state = 'copy' - names['summary'] = "%s%s $HW_%s" % (names['name'], + names['summary'] = "%s%s $HW_%s" % (names['short'], '.' * (32 - len(names['name'])), names['upper']) for line in configure_ac.split('\n')[:-1]: if state == 'copy': @@ -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 ")