Compare commits

..

3 Commits

Author SHA1 Message Date
Buddy Sandidge
c9004e963e Update Tile38 version 2023-05-15 14:44:32 -07:00
Buddy Sandidge
2363afec9d Update slugify to a function instead of alias 2023-05-15 14:43:44 -07:00
Buddy Sandidge
f18433b158 Add install gofumpt script 2023-05-03 15:16:41 -07:00
3 changed files with 28 additions and 4 deletions

View File

@ -1,7 +1,5 @@
#ft=sh #ft=sh
alias slugify="sed -e 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z"
if type nvim >/dev/null 2>/dev/null ; then if type nvim >/dev/null 2>/dev/null ; then
export EDITOR=nvim export EDITOR=nvim
alias vim=nvim alias vim=nvim
@ -9,6 +7,17 @@ else
export EDITOR=vim export EDITOR=vim
fi fi
slugify () (
if [ "$#" -ne 0 ] ; then
echo "$@" | slugify
else
iconv --to-code ascii//TRANSLIT |
sed -E 's/[^a-zA-Z0-9]+/-/g' |
sed -E 's/^-+\|-+$//g' |
tr '[:upper:]' '[:lower:]'
fi
)
source_env_file () { source_env_file () {
if [ ! -f "${1}" ]; then if [ ! -f "${1}" ]; then
return return

15
go/.local/bin/install-gofumpt Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
# shellcheck disable=SC1090
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=gofumpt
VERSION=${VERSION:-v0.5.0}
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
URL=https://github.com/mvdan/gofumpt/releases/download/${VERSION}/gofumpt_${VERSION}_$(get_os)_$(get_arch)
extract_binary "${URL}" "${DEST}/${VERSION}/${APP}"
set_current_link "${DEST}" "${VERSION}"
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"

View File

@ -3,8 +3,8 @@
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh" source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=tile38 APP=tile38
VERSION=${VERSION:-1.28.0} VERSION=${VERSION:-1.30.2}
DEST="${XDG_DATA_HOME}/apps/releases/${APP}" DEST=${XDG_DATA_HOME}/apps/releases/${APP}
install_zip () ( install_zip () (
URL=https://github.com/tidwall/tile38/releases/download/${VERSION}/tile38-${VERSION}-$(get_os)-$(get_arch).zip URL=https://github.com/tidwall/tile38/releases/download/${VERSION}/tile38-${VERSION}-$(get_os)-$(get_arch).zip