Dolda2000 GitWeb
/
utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Select . by default instead of erroring out.
[utils.git]
/
bkselect.c
diff --git
a/bkselect.c
b/bkselect.c
index
3847879
..
736a575
100644
(file)
--- a/
bkselect.c
+++ b/
bkselect.c
@@
-84,7
+84,7
@@
int bkselect(char *path, int s)
void usage(void)
{
void usage(void)
{
- fprintf(stderr, "usage: bkselect [-hsqo]
path...
\n");
+ fprintf(stderr, "usage: bkselect [-hsqo]
[path...]
\n");
}
int main(int argc, char **argv)
}
int main(int argc, char **argv)
@@
-110,13
+110,13
@@
int main(int argc, char **argv)
}
}
if(argc - optind < 1) {
}
}
if(argc - optind < 1) {
-
usage(
);
- exit(1);
- }
- r = 0;
- for(i = optind; i < argc; i++) {
- if(bkselect(argv[i], s))
- r = 1;
+
r = bkselect(".", s
);
+ } else {
+ r = 0;
+ for(i = optind; i < argc; i++) {
+ if(bkselect(argv[i], s))
+ r = 1;
+ }
}
if(printsize)
printf("%lli\n", tsize);
}
if(printsize)
printf("%lli\n", tsize);