-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgen.sh
More file actions
executable file
·44 lines (28 loc) · 1.52 KB
/
gen.sh
File metadata and controls
executable file
·44 lines (28 loc) · 1.52 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
#!/bin/bash
source ./utils/inc/sh/colors.sh
function changeDir {
cd $1
echo -e "${UNDERLINE}[ * ] Moved to \`$1\`${RESET}"
}
if [ "$1" == "--ungen" ]; then
echo -e "${BOLD}[ * ] Removing generated files"
echo -e "${RED}[ WARN ] Are you sure that you want to continue? This will remove all existing data [ Y / N / GET ]${RESET}"
read answer
if [ "${answer,,}" == "yes" ] || [ "${answer,,}" == "y" ]; then
printf "[ DEL ] Deleting all from \`.private/\` " ; find .private -mindepth 1 ! -name "project.json" -delete ; echo "[ DONE ]"
echo -e "[ DONE ]${RESET}"
elif [ "${answer,,}" == "get" ]; then
tree .private/
echo "[ DONE ]"
else
echo -e "${RESET}Abort."
fi
echo -e "${BOLD}${CYAN}[ NOTE ] Execute this file without the \`--ungen\` flag to generate all files"
exit
fi
printf "${BOLD}${BRIGHT_GREEN}[ MKDIR ] Generating \`.private/\` files${RESET} " ; mkdir -p ./.private ; echo -e "${BOLD}${BRIGHT_GREEN}[ OK ]${RESET}"
printf "${BOLD}${BRIGHT_GREEN}[ MKDIR ] Generating \`.private/dev\` files${RESET} " ; mkdir -p ./.private/dev ; echo -e "${BOLD}${BRIGHT_GREEN}[ OK ]${RESET}"
printf "${BOLD}${BRIGHT_GREEN}[ MKDIR ] Generating \`build/\` files${RESET} " ; mkdir -p ./build ; echo -e "${BOLD}${BRIGHT_GREEN}[ OK ]${RESET}"
printf "${BOLD}${BRIGHT_GREEN}[ TOUCH ] Generating \`.private/dev/compilation.json\` files${RESET} " ; touch .private/dev/compilation.json ; echo -e "${BOLD}${BRIGHT_GREEN}[ OK ]${RESET}"
doxygen Doxyfile
echo -e "[ DONE ]"