Commit 440bb02f authored by Kaarle Ritvanen's avatar Kaarle Ritvanen Committed by Timo Teräs

abuild-sudo: allow commands with '-' in the name

parent 6ff70e37
......@@ -80,7 +80,12 @@ int main(int argc, const char *argv[])
name ? name : "(unknown)", ABUILD_GROUP);
}
cmd = strrchr(argv[0], '-');
cmd = strrchr(argv[0], '/');
if (cmd)
cmd++;
else
cmd = argv[0];
cmd = strchr(cmd, '-');
if (cmd == NULL)
errx(1, "Calling command has no '-'");
cmd++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment