-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwiz.sh
executable file
·43 lines (33 loc) · 1.16 KB
/
wiz.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
#!/usr/bin/env bash
# To display colored usage of any output:
export NONE='\033[00m'
export RED='\033[01;31m'
export GREEN='\033[01;32m'
export YELLOW='\033[01;33m'
export BLUE='\033[0;36m'
export BOLD='\033[1m'
export UNDERLINE='\033[4m'
# Do necessary changes
export WIZSHELL_DIRECTORY=${WORK_DIRECTORY}/wizshell
export DB_BACKUP_DIRECTORY=${WORK_DIRECTORY}/database-backups
export PATH="$WIZSHELL_DIRECTORY/scripts:$PATH"
# Register all aliases
aliasFiles=(angular android cordova-ionic ide firebase git gradle grails linux mongodb mysql nest nginx npm react
tomcat unix-network utils aws)
for i in "${aliasFiles[@]}"; do
. ${WIZSHELL_DIRECTORY}/aliases/"$i".sh
done
# Print all aliases
export function all() {
for i in "${aliasFiles[@]}"; do
echo -e "\n${GREEN}${i} aliases${NONE}"
# Install https://github.com/sharkdp/bat
bat --paging=never ${WIZSHELL_DIRECTORY}/aliases/"$i".sh
done
echo -e "\n${GREEN}https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/README.md${NONE}"
}
if [[ "$(uname)" == "Darwin" ]]; then
. ${WIZSHELL_DIRECTORY}/aliases/mac.sh
fi
# Make sure database-directory exists
mkdir -p ${DB_BACKUP_DIRECTORY}