Skip to content

Commit fca2e64

Browse files
committed
add ,mkobj script to create an OBJDIR that isn't backed up
1 parent b39d096 commit fca2e64

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

,mkobj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
#
3+
# ,mkobj -- make an objdir for the NetBSD build system
4+
#
5+
# usage: ,mkobj [dir]
6+
# Defaulting to dir to "obj". Mark the directory as not to be backed up.
7+
#
8+
obj=${1:-obj}
9+
mkdir ${obj}
10+
11+
# Mark $obj as not to be backed up.
12+
case $(uname -s) in
13+
NetBSD)
14+
chflags -d nodump ${obj}
15+
;;
16+
Darwin)
17+
tmutil addexclusion ${obj}
18+
;;
19+
# XXX handle Linux
20+
esac

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ command line options to simplify often used QEMU incantations.
2929

3030
Run it with the `-h` or `--help` options to print the usage message.
3131

32+
### ,mkobj
33+
Create a NetBSD build system OBJDIR (default "obj") and mark it as not to be
34+
backuped.
35+
3236
### ,yymmdd
3337
Outputs the current date in YYMMDD format -- shorter and
3438
faster to type than `date +%y%m%d`.

0 commit comments

Comments
 (0)