0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-12 00:10:52 +00:00
2024-02-03 23:32:18 +08:00

54 lines
1.9 KiB
Diff

diff --git a/ugit b/ugit
index c116180..c9cce1a 100755
--- a/ugit
+++ b/ugit
@@ -429,7 +429,6 @@ print_help() {
printf "Available options:\n"
printf " -h, --help Print this help and exit\n"
printf " -v, --version Print current ugit version\n"
- printf " -u, --update Update ugit\n"
printf " -g, --guide Open the ugit undo text guide\n\n"
printf "Contact 📬️: %s for assistance\n" "$(tput bold)varshneybhupesh@gmail.com${RESET}"
printf "Read the guide: %s\n" "https://til.bhupesh.me/git/how-to-undo-anything-in-git"
@@ -443,31 +442,6 @@ get_changelog() {
printf "Read Full Changelog: %s\n" "${BOLD}${CHANGELOG}${RESET}"
}
-ugit_update() {
- if [ -n "${UGIT_RUNNING_IN_DOCKER-}" ] && [ "$UGIT_RUNNING_IN_DOCKER" = true ]; then
- printf "%s\n\n" "You are running version ${VERSION} of ugit via Docker. Please pull the latest docker image to update."
- printf "\t%s\n" "${BOLD_ORG_FG}docker pull bhupeshimself/ugit${RESET}"
- return
- fi
-
- printf "%s\n" "Checking for updates ..."
- curl -s -L "$SCRIPT_URL" > "$TMP_FILE"
- NEW_VER=$(grep "^VERSION" "$TMP_FILE" | awk -F'[="]' '{print $3}')
-
- if [[ "$VERSION" < "$NEW_VER" ]]; then
- printf "Updating ugit \e[31;1m%s\e[0m -> \e[32;1m%s\e[0m\n" "$VERSION" "$NEW_VER"
- chmod +x "$TMP_FILE"
- # WIP
- if cp "$TMP_FILE" "$SCRIPT_NAME"; then printf "%s\n" "Done"; fi
- rm -f "$TMP_FILE"
- get_changelog
- else
- printf "%s\n" "ugit is already at the latest version ($VERSION)"
- rm -f "$TMP_FILE"
- fi
- exit 0
-}
-
open_guide() {
GUIDE="https://til.bhupesh.me/git/how-to-undo-anything-in-git"
@@ -517,8 +491,6 @@ main() {
case "$key" in
--version|-v)
show_version;;
- --update|-u)
- ugit_update;;
--help|-h)
print_help
exit;;