addet push script
This commit is contained in:
parent
95e122d05c
commit
f9239f9c42
1 changed files with 38 additions and 0 deletions
38
setup/hlpush.sh
Normal file
38
setup/hlpush.sh
Normal file
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/env bash
|
||||
# ─< ANSI color codes >───────────────────────────────────────────────────────────────────
|
||||
RED='\033[0;31m'
|
||||
CYAN='\033[0;36m'
|
||||
YELLOW='\033[0;33m'
|
||||
LIGHT_GREEN='\033[0;92m'
|
||||
BOLD='\033[1m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
echo_error() {
|
||||
printf "${BOLD}${RED}ERROR: ${NC}${RED}%s${NC}\n" "$1" >&2
|
||||
}
|
||||
|
||||
echo_info() {
|
||||
printf "${BOLD}${CYAN}INFO: ${NC}${CYAN}%s${NC}\n" "$1"
|
||||
}
|
||||
|
||||
echo_warning() {
|
||||
printf "${BOLD}${YELLOW}WARNING: ${NC}${YELLOW}%s${NC}\n" "$1"
|
||||
}
|
||||
|
||||
echo_note() {
|
||||
printf "${BOLD}${LIGHT_GREEN}NOTE: ${NC}${LIGHT_GREEN}%s${NC}\n" "$1"
|
||||
}
|
||||
|
||||
main() {
|
||||
local dir="/opt/docker"
|
||||
|
||||
cd $dir || echo_error "Can't navigate to $dir"
|
||||
|
||||
git add .
|
||||
|
||||
git commit -m "Automatic push on $(date)"
|
||||
|
||||
git push
|
||||
}
|
||||
|
||||
main
|
Loading…
Add table
Add a link
Reference in a new issue