Skip to content

Commit

Permalink
selfupdate is broken #174 : adjust README to remove token trick
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Dec 9, 2024
1 parent b38e917 commit f747d4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion Makesurefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@

@goal README.md @private
@doc 'compiles release version of README.md'
$AWK '
$AWK -v NEXT_VERSION="$NEXT_VERSION" '
{
gsub(/raw\.githubusercontent\.com\/xonixx\/makesure\/[^\/]+\//, "raw.githubusercontent.com/xonixx/makesure/v" NEXT_VERSION "/")
}
/^\$ \.\/makesure -h$/ { print; stop=1; system("./makesure -h") }
/^```$/ { stop=0 }
!stop' README.md > README.md.1
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ Usage: makesure [options...] [-f buildfile] [goals...]
Since `makesure` is a tiny utility represented by a single file, the recommended installation strategy is to keep it local to a project where it's used (this means in code repository). Not only this eliminates the need for repetitive installation for every dev on a project, but also allows using separate `makesure` version per project and update only as needed.

```sh
wget "https://raw.githubusercontent.com/xonixx/makesure/main/makesure?token=$(date +%s)" -Omakesure && \
wget "https://raw.githubusercontent.com/xonixx/makesure/v0.9.23/makesure" -Omakesure && \
chmod +x makesure && echo "makesure $(./makesure -v) installed"
```
or
```sh
curl "https://raw.githubusercontent.com/xonixx/makesure/main/makesure?token=$(date +%s)" -o makesure && \
curl "https://raw.githubusercontent.com/xonixx/makesure/v0.9.23/makesure" -o makesure && \
chmod +x makesure && echo "makesure $(./makesure -v) installed"
```

Expand Down Expand Up @@ -659,7 +659,7 @@ Install Bash completion for `./makesure` locally
```sh
[[ ! -f ~/.bash_completion ]] && touch ~/.bash_completion
grep makesure ~/.bash_completion >/dev/null || echo '. ~/.makesure_completion.bash' >> ~/.bash_completion
curl "https://raw.githubusercontent.com/xonixx/makesure/main/completion.bash?token=$(date +%s)" -o ~/.makesure_completion.bash
curl "https://raw.githubusercontent.com/xonixx/makesure/v0.9.23/completion.bash" -o ~/.makesure_completion.bash
echo 'Please reopen the shell to activate completion.'
```

Expand Down

0 comments on commit f747d4b

Please sign in to comment.