Skip to content

Commit 2003125

Browse files
authored
Merge pull request #5 from sblack4/v1
v1 basic looks good
2 parents f292ff3 + e282bbd commit 2003125

File tree

3 files changed

+92
-10
lines changed

3 files changed

+92
-10
lines changed

README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,20 @@ Quickly customize your Linux environment so you can get to work
44

55
## Getting Started
66

7+
Get your dotfiles, install your packages, and bootstrap your
8+
linux server with three commands.
79

8-
10+
```sh
11+
curl -O http://sblack4.github.io/linux-setup-tools/setup.sh
12+
chmod +x setup.sh
13+
./setup.sh
14+
```
15+
or get fancy and shorten that url (try [goo.gl/](https://goo.gl/))
16+
```sh
17+
curl -L goo.gl/7gHfnq -o setup.sh
18+
chmod +x setup.sh
19+
./setup.sh
20+
```
921

1022
### Prerequisites
1123

@@ -22,23 +34,22 @@ Give examples
2234
## Running the tests
2335

2436

25-
## Deployment
26-
27-
28-
## Built With
37+
## Contributing
2938

39+
I've tried to take a note from
40+
[Google's shell styleguide](https://google.github.io/styleguide/shell.xml)
3041

31-
## Contributing
42+
Please read [CONTRIBUTING.md](.github/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
3243

33-
Please read [CONTRIBUTING.md](.github/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
44+
(This contributing doc is a github template)
3445

3546
## Versioning
3647

3748
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags).
3849

3950
## Authors
4051

41-
See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.
52+
See also the list of [contributors](https://github.com/sblack4/linux-setup-tools/contributors) who participated in this project.
4253

4354
## License
4455

@@ -47,3 +58,4 @@ This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md
4758
## Acknowledgments
4859

4960
* Thanks to @PurpleBooth for the awesome [README Template](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2)
61+
* @renzok for the great [bash template](https://gist.github.com/renzok/ba603c044964b2c50153)

index.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.sh

100644100755
Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,74 @@
11
#!/bin/bash
2+
#
3+
# sets up environment in new server
24

3-
echo hello world
5+
INTERACTIVE=
6+
HOME_DIRECTORY=~
7+
8+
9+
usage() {
10+
cat << EOF
11+
Usage: $0 [-ih] [-d directory]
12+
-d --directory $HOME_DIRECTORY set up in $HOME_DIRECTORY
13+
-i interactive
14+
-h displays help / usage
15+
EOF
16+
}
17+
18+
err() {
19+
echo "[$(date +'%Y-%m-%dT%H:%M:%S%z')]: $@" >&2
20+
exit 1
21+
}
22+
23+
get_dot_files() {
24+
25+
cd $HOME_DIRECTORY
26+
27+
echo "setting up dotfiles for $USER in $HOME_DIRECTORY"
28+
29+
echo "$(PWD)"
30+
31+
curl https://gist.githubusercontent.com/sblack4/e5a8dda8c8b0f78984657c05f6712ae3/raw/c21eb0fa7d0b4e3e550ce484fd5773fe40ed5a21/.vimrc >> .vimrc
32+
33+
curl https://gist.githubusercontent.com/sblack4/e5a8dda8c8b0f78984657c05f6712ae3/raw/c21eb0fa7d0b4e3e550ce484fd5773fe40ed5a21/.bashrc >> .bashrc
34+
35+
36+
37+
}
38+
39+
install_necessary_programs() {
40+
# I'll be using yum, this can be changed
41+
42+
sudo yum install -y vim wget mlocate
43+
}
44+
45+
get_opts() {
46+
while [ "$1" != "" ]; do
47+
case $1 in
48+
-d | --directory ) shift # shift to get following arg
49+
HOME_DIRECTORY=$1
50+
;;
51+
-i | --interactive ) INTERACTIVE=1
52+
;;
53+
-h | --help ) usage
54+
exit
55+
;;
56+
* ) usage
57+
# exit 1
58+
esac
59+
shift
60+
done
61+
}
62+
63+
main() {
64+
65+
get_opts "$@"
66+
67+
get_dot_files
68+
69+
install_necessary_programs
70+
71+
exit 0
72+
}
73+
74+
main "$@"

0 commit comments

Comments
 (0)