2011-05-24 16:39:20 -04:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
|
|
|
#include <libgen.h>
|
|
|
|
#include <stdio.h>
|
2014-11-13 12:29:30 -05:00
|
|
|
|
2011-05-24 16:39:20 -04:00
|
|
|
#include "util.h"
|
|
|
|
|
2013-06-14 14:20:47 -04:00
|
|
|
static void
|
|
|
|
usage(void)
|
|
|
|
{
|
2015-02-01 14:52:28 -05:00
|
|
|
eprintf("usage: %s path\n", argv0);
|
2013-06-14 14:20:47 -04:00
|
|
|
}
|
|
|
|
|
2011-05-24 16:39:20 -04:00
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
2013-06-14 14:20:47 -04:00
|
|
|
ARGBEGIN {
|
|
|
|
default:
|
|
|
|
usage();
|
|
|
|
} ARGEND;
|
|
|
|
|
2015-02-28 13:50:12 -05:00
|
|
|
if (argc != 1)
|
2013-06-14 14:20:47 -04:00
|
|
|
usage();
|
2011-05-24 16:39:20 -04:00
|
|
|
|
2013-10-05 10:08:06 -04:00
|
|
|
puts(dirname(argv[0]));
|
2013-06-14 14:20:47 -04:00
|
|
|
|
2014-10-02 18:46:04 -04:00
|
|
|
return 0;
|
2011-05-24 16:39:20 -04:00
|
|
|
}
|