SymLink
mac
file
cmd
$ ln -s SOURCE_DIR DEST_DIR
$ find
find [path] -type l
//finds all symlink at specified path
find . -type l
//finds all symlink in current dir
$ readlink
readlink [path]
//returns absolute path of symlink
//Mac OSX only; on unix use -f flag
greadlink -f path
coreutils solution
//sudo brew install coreutils
pwd -P
//returns absolute path of current dir
//find list of symlinks, cd to directory, pwd???
$ rsync
rsync –options SrcDir DstDir
EX:
rsync –r -v SrcDir DstDir
(-options)
-nEvauz
-n
//puts rsync into "dry run" mode. rsync will return a list of files that would have been copied but will not actually copy anything.
-E
// extended-attributes such as Mac-centric ACLs and resource forks will be preserved.
–v
// verbose mode tells rsync to output results and messages
//recursive
-r
-a
//equivalent to −rlptgoD
//recursive +
// preserve any symbolic links, preserves file and directory permissions, preserves the timestamp, and preserve the owner and group
//archive mode tells rsync to--essentially--copy files recursively through sub-directories while maintaining permissions.
-u
update mode prevents newer files at the destination directory from being over-written.
-z
// compression mode can speed up copying by compressing/uncompressing file data before/after being copied.
(others)
−−del
//(alias for −−delete−during)
−−delete−during (receiver deletes during xfer, not before)
(other)
−−delete (deletes extraneous files from dest dirs)
−−delete−before (receiver deletes before xfer [default])
−−delete−after (receiver deletes after xfer, not before)
−−delete−excluded (also delete excluded files from dest dirs)
???
−−max−delete=NUM (don’t delete more than NUM files)
copy symlink
rsync --dry-run -r --copy-links $SOURCE $DEST
//remove --dry-run flag when ready to do for real
rsync -n -a --del -v /Users/mton/GoogleDrive_mt/RemoteWork/BlubberBuster/Enemy_AI/Assets/Shared/__MtonFrameWork /Users/mton/Dropbox/Code/SymLink/Unity/Assets/Shared
flags
--copy-links
gets all files
--copy-dirlinks
gets just directories
how-to-copy-only-symbolic-links
find /path/to/files -type l -print | \
rsync -av --files-from=- /path/to/files user@targethost:/path
script
updateSymlinkMton(dest, source)
scheduler
launchd
(deprecated)
Cron
(file to run)
copy file
cp source destination
copy folder
cp -r source destination
// -r == recursive
(types)
agent : per-user processes
/Library/LaunchAgents
// or LaunchAgents subdirectory of an individual user’s Library directory
daemons : software tools
/Library/LaunchDaemons
(pList)
win
unity
PluginRepo
$SOURCE
project
SymLink
Project/
(input settings)
(layer tags)
Asset/
project
Project/
Asset/
ControlFreak
Phsyics2D
$DEST
project
Project/
Asset/
NOTE:
will fail to path towards usb drive
must be on the same drive as unity installation??
.dll
DON'T WORK???
Vectrosity source symlinks fine
Vectrosity.dll fails to find namespace