-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathinstall
executable file
·60 lines (50 loc) · 1.34 KB
/
install
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
53
54
55
56
57
58
59
60
#! /usr/bin/env bash
services() {
cp -r Services/* $HOME/Library/Services
}
bbedit() {
BBEDIT_DIR="$HOME/Library/Application Support/BBEdit/Scripts/"
mkdir -p "$BBEDIT_DIR"
cp "BBEdit/Open in Marked.applescript" "$BBEDIT_DIR"
}
st2() {
ST2_DIR="$HOME/Library/Application Support/Sublime Text 2/Packages/User"
mkdir -p "$ST2_DIR"
cp "Sublime/Marked 2.sublime-build" "$ST2_DIR"
}
st3() {
ST3_DIR="$HOME/Library/Application Support/Sublime Text 3/Packages/User"
mkdir -p "$ST3_DIR"
cp "Sublime/Marked 2.sublime-build" "$ST3_DIR"
}
iawriter() {
IAWRITER_DIR="$HOME/Library/Scripts/Applications/iA Writer/"
mkdir -p "$IAWRITER_DIR"
cp "iAWriter/Open in Marked.applescript" "$IAWRITER_DIR"
}
# TODO:
# Add vim support.
# Add emacs support.
if [[ -z $@ ]]
then
cat << EOF
This scriptlet automates installing *some* elements of the Marked
bonus pack. It currently supports the targets listed below, using the
corresponding keywords:
Target Keyword
-------------- --------
Services services
BBEdit. bbedit
Sublime Text 2 st2
Sublime Text 3 st3
iA Writer. iawriter
Invoke it with one or more of the keywords as arguments, e.g.
./install services st3
EOF
else
for i in $@
do
echo "Installing $i"
$i
done
fi