-
-
Save GeekAndDad/024f227425d11722278fe4cd5a52a10b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SRC1=$HOME/Library/Safari | |
SRC2=$HOME/Library/Containers/com.apple.Safari/Data/Library/Safari | |
HOST=$( hostname | sed 's/\..*//' ) | |
HOUR=$( date +"%H" ) | |
DST=$HOME/Sync/Safari/$HOST/$HOUR | |
mkdir -p $DST 2>/dev/null | |
cd $SRC1 | |
cp \ | |
Bookmarks.plist \ | |
CloudTabs.db \ | |
History.db \ | |
LastSession.plist \ | |
RecentlyClosedTabs.plist \ | |
$DST 2>/dev/null | |
cd $SRC2 | |
cp \ | |
SafariTabs.db \ | |
$DST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment