Added service files

This commit is contained in:
SebastianObi
2023-08-10 20:55:36 +02:00
parent 53dc185d70
commit a478a39a05
14 changed files with 177 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ COMMENT_INIT="Initial commit"
_prompt() {
echo -e ""
echo -e "Select an option:"
options=("Commit/Push" "Clear History" "Init" "Init (Pull only)" "Exit")
options=("Commit/Push" "Clear History" "Init" "Init (Pull only)" "Init (Push only)" "Exit")
select opt in "${options[@]}"; do
case $opt in
"Commit/Push"*)
@@ -33,6 +33,9 @@ _prompt() {
"Init (Pull only)"*)
_init_pull
break;;
"Init (Push only)"*)
_init_push
break;;
"Init"*)
_init
break;;
@@ -152,6 +155,28 @@ _init_pull() {
}
_init_push() {
echo -e ""
echo -e "Init (Push only)"
read VAR
if [ -z "${VAR}" ]; then
VAR="${COMMENT_INIT}"
fi
rm -rf .git
git init
_define_files
git branch -M "${BRANCH}"
git remote add origin "${ORIGIN}"
git push -f -u origin "${BRANCH}"
}
##############################################################################################################
# Setup/Start