diff --git a/cmd/control/cmd/update.go b/cmd/control/cmd/update.go index 7133fd4..788c6e2 100644 --- a/cmd/control/cmd/update.go +++ b/cmd/control/cmd/update.go @@ -10,7 +10,7 @@ import ( var updateCmd = &cobra.Command{ Use: "update", - Short: "checks for updates and updates RESH", + Short: "check for updates and update RESH", Run: func(cmd *cobra.Command, args []string) { url := "https://raw.githubusercontent.com/curusarn/resh/master/scripts/rawinstall.sh" execCmd := exec.Command("bash", "-c", "curl -fsSL "+url+" | bash") diff --git a/scripts/rawinstall.sh b/scripts/rawinstall.sh index 556d258..c9e0424 100755 --- a/scripts/rawinstall.sh +++ b/scripts/rawinstall.sh @@ -25,6 +25,7 @@ version="${tag:1}" echo " * Latest version: $version (git tag: $tag)" +# TODO: compare semanitcally instead of just using equality if [ "${__RESH_VERSION-}" == "$version" ]; then echo " * Resh is up to date - nothing to do - exiting." exit 0