-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathquick_start.sh
69 lines (62 loc) · 2.44 KB
/
quick_start.sh
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
61
62
63
64
65
66
67
68
#!/bin/bash
#
# This file was written by Robert Quattlebaum <[email protected]>.
#
# This work is provided as-is. Unless otherwise provided in writing,
# Robert Quattlebaum makes no representations or warranties of any
# kind concerning this work, express, implied, statutory or otherwise,
# including without limitation warranties of title, merchantability,
# fitness for a particular purpose, non infringement, or the absence
# of latent or other defects, accuracy, or the present or absence of
# errors, whether or not discoverable, all to the greatest extent
# permissible under applicable law.
#
# To the extent possible under law, Robert Quattlebaum has waived all
# copyright and related or neighboring rights to this work. This work
# is published from the United States.
#
# I, Robert Quattlebaum, dedicate any and all copyright interest in
# this work to the public domain. I make this dedication for the
# benefit of the public at large and to the detriment of my heirs and
# successors. I intend this dedication to be an overt act of
# relinquishment in perpetuity of all present and future rights to
# this code under copyright law. In jurisdictions where this is not
# possible, I hereby release this code under the Creative Commons
# Zero (CC0) license.
#
# * <http://creativecommons.org/publicdomain/zero/1.0/>
#
die () {
echo $*
exit 1
}
cd ~
[ -x .shattings/setup.sh ] && die 'Shattings already installed, run ~/.shattings/setup.sh'
echo 'Shattings Quick Installer'
echo ''
echo 'This script will place the shattings root in ~/.shattings,'
echo 'and then execute the shattings setup script.'
echo ''
read -p 'Press any key to continue installing or CTRL-C to abort.'
sleep 1
if [ `uname` = "Darwin" ]
then
if ( which git 1>/dev/null ) && ( which xcode-select 1>/dev/null )
then
git --version 1>/dev/null || die Xcode command line tools are needed. Install them and try again.
fi
fi
if ( which git 1>/dev/null )
then
git clone https://github.com/darconeous/shattings.git .shattings || die Unable to clone shattings repository
else
if ( which curl 1>/dev/null )
then
curl -L https://github.com/darconeous/shattings/tarball/master | tar xvz || die Unable to download archive
else
wget --output-document=/dev/stdout https://github.com/darconeous/shattings/tarball/master | tar xvz || die Unable to download archive
fi
mv darconeous-shattings* .shattings || die Unable to move archive contents
fi
cd .shattings || die Unable to move into .shattings
./setup.sh