1
0
mirror of https://github.com/DoctorWkt/unix-jun72.git synced 2026-02-14 20:07:17 +00:00

- trying out a new build style.

This commit is contained in:
tim.newsham
2008-05-08 03:01:00 +00:00
parent 2001817273
commit 1fa609991b
3 changed files with 196 additions and 4 deletions

View File

@@ -158,7 +158,7 @@ def wrFile(out, fn, d, mode, uid) :
def wrEof(out) :
wrFile(out, "", "", 0, 0)
def copyFile(out, fn) :
def copyFile(root, out, fn) :
"copy file from local filesystem to tape."
f = file(fn, 'rb')
d = f.read()
@@ -172,12 +172,17 @@ def copyFile(out, fn) :
if not fn in perms : print "making up mode"
wrFile(out, fn, d, mode, uid)
root = "/tmp/s2"
def main() :
if len(sys.argv) < 2 :
print "usage: %s root files" % sys.argv[0]
raise SystemExit(1)
root = sys.argv[1]
files = sys.argv[2:]
f = file("tape", "wb")
f.write("\0" * (512 * 65)) # start at block 65
for fn in sys.argv[1:] :
copyFile(f, fn)
for fn in files :
copyFile(root, f, fn)
wrEof(f)
f.close()