1
0
mirror of git://git.suckless.org/sbase synced 2024-12-22 23:13:44 +00:00
sbase/link.c

28 lines
346 B
C
Raw Normal View History

2014-10-17 14:32:08 +00:00
/* See LICENSE file for copyright and license details. */
#include <unistd.h>
2014-10-17 14:32:08 +00:00
#include "util.h"
2015-02-28 18:42:26 +00:00
static void
usage(void)
{
eprintf("usage: %s target name\n", argv0);
}
2014-10-17 14:32:08 +00:00
int
main(int argc, char *argv[])
{
2015-02-28 18:42:26 +00:00
ARGBEGIN {
default:
usage();
} ARGEND;
2014-10-17 14:32:08 +00:00
2015-02-28 18:42:26 +00:00
if (argc != 2)
usage();
2015-02-28 18:42:26 +00:00
if (link(argv[0], argv[1]) < 0)
2014-10-17 14:32:08 +00:00
eprintf("link:");
2015-02-28 18:42:26 +00:00
2014-10-17 14:32:08 +00:00
return 0;
}