forked from cdelorme/system-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathosx.sh
More file actions
executable file
·47 lines (34 loc) · 1.7 KB
/
osx.sh
File metadata and controls
executable file
·47 lines (34 loc) · 1.7 KB
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
#!/bin/bash
# @todo set hostname (run with sudo, will require password)
# scutil --set HostName "${config_system_hostname}"
# domainname "${config_system_domainname}"
# @todo determine sudo commands first to execute within time limit on password entry
# @todo install dot-files
# @todo generate ssh key
# @todo upload ssh key to github
# @todo generate github api token & append to ~/.bashrc
# keys=$(curl -s -i -u "${GITHUB_USERNAME}:${GITHUB_PASSWORD}" -H "Content-Type: application/json" -H "Accept: application/json" -X GET https://api.github.com/authorizations)
# if echo $keys | grep "homebrew" &> /dev/null
# then
# token=$(echo "${keys#*homebrew}" | grep token | head -n1 | tr -d '":,' | awk '{print $2}')
# else
# keys=$(curl -i -u "${GITHUB_USERNAME}:${GITHUB_PASSWORD}" -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d "{\"scopes\":[\"gist\",\"repo\",\"user\"],\"note\":\"homebrew\"}" https://api.github.com/authorizations)
# token=$(echo "$keys" | grep token | head -n1 | tr -d '":,' | awk '{print $2}')
# fi
# if [ -n "$token" ]
# then
# # push token into .bashrc
# echo -ne "\n# homebrew github token (remove rate-limiting)\nexport HOMEBREW_GITHUB_API_TOKEN=${token}" >> "$DOWNLOADS/.bashrc"
# fi
# @todo homebrew installation
# @todo homebrew package installation
# @todo download some bin tools
mkdir -p ~/.bin
$dl_cmd ~/.bin/brewgrade "${remote_source}/data/home/.bin/brewgrade"
# @todo setup crontab /w update-keys
chmod +x ~/.bin/brewgrade
echo "@daily ~/.bin/brewgrade" >> ~/.crontab
crontab ~/.crontab
# install golang vim plugin
# which go 2>/dev/null && cp -R "$(go env GOROOT)/misc/vim/" "$DOWNLOADS/.vim"
# @todo vim plugin installation (ctrlp, vim-json)