add ln, util.a

This commit is contained in:
Connor Lane Smith
2011-05-24 13:00:30 +01:00
parent 026e63c005
commit fbb80983ce
7 changed files with 98 additions and 7 deletions

23
ln.c Normal file
View File

@@ -0,0 +1,23 @@
/* See LICENSE file for copyright and license details. */
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
#include "util.h"
int
main(int argc, char *argv[])
{
bool sflag = false;
char c;
while((c = getopt(argc, argv, "s")) != -1)
switch(c) {
case 's':
sflag = true;
break;
default:
exit(EXIT_FAILURE);
}
enmasse(argc - optind, &argv[optind], sflag ? symlink : link);
return EXIT_SUCCESS;
}