-
Notifications
You must be signed in to change notification settings - Fork 1
/
archive.zsh
executable file
·53 lines (41 loc) · 1.18 KB
/
archive.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/zsh
external_dir="externals"
xattr -dr $external_dir/morphograph.mxo
backup_dir="/Users/jml/Desktop/mgraph_backup"
echo "------------------------------"
echo "------------------------------"
echo "------------------------------"
echo " "
echo "back up dir is: " $backup_dir
if [ -d $backup_dir ]
then
echo 'found a previously existing backup dir; removing contents...'
rm -rf $backup_dir/*
else
echo 'creating backup directory'
mkdir $backup_dir
fi
echo " "
echo "------------syncing backup dir"
echo " "
#rsync -av --dry-run --exclude="build/*" --exclude ".git" --exclude="*.sh" $PWD $backup_dir
rsync -av --exclude="build/" --exclude ".git" --exclude="*.sh" $PWD/ $backup_dir
cp_dir="/Users/jml/Desktop/morphograph_alpha"
echo " "
echo "copy dir is: " $cp_dir
if [ -d $cp_dir ]
then
rm -rf $cp_dir"/*"
else
mkdir $cp_dir
fi
echo " "
echo "------------copying data to new desktop directory"
echo " "
cp -v help/morphograph.maxhelp docs/morphograph.maxref.xml $cp_dir
cp -R $external_dir/morphograph.mxo $cp_dir
cp -v help/*.wav $cp_dir
cp -v help/*.svg $cp_dir
echo " "
echo "------------archive complete. Please see" $cp_dir "for details."
echo "------------backup dir is" $backup_dir