mirror of
https://github.com/elliotnunn/empw.git
synced 2024-12-21 15:29:27 +00:00
Hide ephemeral files from Time Machine
This commit is contained in:
parent
a2fc3b9d47
commit
2cc7368456
1
empw
1
empw
@ -216,6 +216,7 @@ hsyncback = path.join(scriptfolder, 'hsyncback')
|
||||
if not path.exists(bootimg):
|
||||
print('Creating new scratch boot disk.')
|
||||
copyfile(backupimg, bootimg)
|
||||
run(['xattr', '-w', 'com.apple.metadata:com_apple_backup_excludeItem', 'com.apple.backupd', bootimg])
|
||||
|
||||
|
||||
|
||||
|
2
hsync
2
hsync
@ -48,6 +48,8 @@ label = 'Src'
|
||||
# Dirs are in /full/path/without/trailing/slash form, thanks to os.path.abspath
|
||||
|
||||
if not path.exists(srcimg):
|
||||
run(['touch', srcimg])
|
||||
run(['xattr', '-w', 'com.apple.metadata:com_apple_backup_excludeItem', 'com.apple.backupd', srcimg])
|
||||
run(['dd', 'if=/dev/zero', 'of='+srcimg, 'bs=1048576', 'count='+str(256)], stdout=DEVNULL, stderr=DEVNULL, check=True)
|
||||
run(['hformat', '-l', label, srcimg], stdout=DEVNULL, check=True)
|
||||
run(['humount'], check=True)
|
||||
|
Loading…
Reference in New Issue
Block a user