-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathup
More file actions
executable file
·99 lines (84 loc) · 1.51 KB
/
up
File metadata and controls
executable file
·99 lines (84 loc) · 1.51 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/bash
function display {
echo -e "\n$1\n"
}
function createDirectories {
display '📂 Creating directories'
.scripts/dir.sh
}
function installApps {
display '🎱 Installing applications'
.scripts/install.sh
}
function installNpm {
display '📦 Installing npm packages globally'
.scripts/install-npm.sh
}
function setupMacOsPref {
display '🔧 Tweaking macOS preferences'
.scripts/macos.sh
}
function loginItems {
display '✨ Configure login items'
.scripts/login-items.sh
}
function stowFiles {
display '🗄 Stowing your .files to $HOME'
ls -d */ | xargs stow -vv
}
function applyGitIgnore {
display '🙅 Applying ~/.gitignore globally'
git config core.excludesfile ~/.gitignore
}
function generateSshKey {
display '🔑 Generating ssh key'
.scripts/ssh.sh
}
function scheduleCron {
display '📅 Scheduling crontab tasks'
crontab .scripts/cron.txt
}
function restartComputer {
display '🖥 All done! You may need to restart your computer'
.scripts/restart.sh
}
function runAll {
createDirectories
stowFiles
source ~/.zshrc
installApps
installNpm
setupMacOsPref
loginItems
applyGitIgnore
scheduleCron
restartComputer
}
function menu {
echo -e "usage:"
echo -e " ./up apps - install apps"
echo -e " ./up ssh-key - set up ssh keys"
echo -e " ./up stow - stow files"
echo -e " ./up all - run all commands"
}
cat banner
case $1 in
apps )
installApps
;;
ssh-key )
generateSshKey
;;
stow )
stowFiles
;;
all )
runAll
;;
help )
menu
;;
* )
menu
;;
esac