Linting cleanup

This commit is contained in:
ViViDboarder 2023-02-24 14:36:47 -08:00
parent 8121246823
commit 260738a1fe
9 changed files with 53 additions and 42 deletions

View File

@ -19,3 +19,6 @@ repos:
rev: 2.1.5 rev: 2.1.5
hooks: hooks:
- id: shellcheck - id: shellcheck
# files: (.*\.sh$|^recipes/.*)
types: [shell, executable]
# files: ^recipes

10
recipes/default/abuse-the-force Normal file → Executable file
View File

@ -1,12 +1,12 @@
#! /bin/bash #! /bin/bash
if [ ! -d $WORKSPACE/abuse-the-force ]; then if [ ! -d "$WORKSPACE/abuse-the-force" ]; then
git clone https://github.com/ViViDboarder/abuse-the-force.git $WORKSPACE/abuse-the-force git clone https://github.com/ViViDboarder/abuse-the-force.git "$WORKSPACE/abuse-the-force"
fi fi
cd $WORKSPACE/abuse-the-force && git pull && rake install cd "$WORKSPACE/abuse-the-force" && git pull && rake install
# Ensure this is in the user PATH # Ensure this is in the user PATH
for f in $DEFAULT_ASSETS_PATH/* ; do for f in "$DEFAULT_ASSETS_PATH"/* ; do
try_link "$f" "$USER_BIN/$(basename $f)" try_link "$f" "$USER_BIN/$(basename "$f")"
done done

View File

@ -1,4 +1,5 @@
#! /bin/bash #! /bin/bash
set -e
# in common # in common
# sudo_package 'libtool automake cmake' # sudo_package 'libtool automake cmake'

10
recipes/default/force-cli Normal file → Executable file
View File

@ -2,13 +2,13 @@
# Some settings are mac specific # Some settings are mac specific
if [[ "$UNAME_STR" == "Darwin" ]]; then if [[ "$UNAME_STR" == "Darwin" ]]; then
wget -P $USER_BIN https://godist.herokuapp.com/projects/heroku/force/releases/current/darwin-amd64/force wget -P "$USER_BIN" https://godist.herokuapp.com/projects/heroku/force/releases/current/darwin-amd64/force
elif [[ "$UNAME_STR" == "Linux" ]]; then elif [[ "$UNAME_STR" == "Linux" ]]; then
wget -P $USER_BIN https://godist.herokuapp.com/projects/heroku/force/releases/current/linux-amd64/force wget -P "$USER_BIN" https://godist.herokuapp.com/projects/heroku/force/releases/current/linux-amd64/force
fi fi
chmod +x $USER_BIN/force chmod +x "$USER_BIN/force"
for f in $DEFAULT_ASSETS_PATH/* ; do for f in "$DEFAULT_ASSETS_PATH"/* ; do
try_link "$f" "$USER_BIN/$(basename $f)" try_link "$f" "$USER_BIN/$(basename "$f")"
done done

0
recipes/default/golang Normal file → Executable file
View File

0
recipes/default/test-recipe Normal file → Executable file
View File

12
recipes/no-sudo/build-fish Normal file → Executable file
View File

@ -2,13 +2,17 @@
log "Compiling and installing fish-shell to local prefix" log "Compiling and installing fish-shell to local prefix"
function main() {
local fish_shell_dir=$WORKSPACE/fish-shell local fish_shell_dir=$WORKSPACE/fish-shell
if [ ! -d $fish_shell_dir ]; then if [ ! -d "$fish_shell_dir" ]; then
log "Cloning fish-shell" log "Cloning fish-shell"
git clone https://github.com/fish-shell/fish-shell $fish_shell_dir git clone https://github.com/fish-shell/fish-shell "$fish_shell_dir"
else else
(cd $fish_shell_dir && git pull) (cd "$fish_shell_dir" && git pull)
fi fi
(cd $fish_shell_dir && ./configure --prefix=$LOCAL_PREFIX --disable-shared && make && make install) (cd "$fish_shell_dir" && ./configure --prefix="$LOCAL_PREFIX" --disable-shared && make && make install)
}
main

15
recipes/no-sudo/build-vim Normal file → Executable file
View File

@ -1,14 +1,16 @@
#!/bin/bash #!/bin/bash
set -e
function main() {
local vim_dir="$WORKSPACE/vim" local vim_dir="$WORKSPACE/vim"
# Build latest vim # Build latest vim
if [ ! -d $vim_dir ]; then if [ ! -d "$vim_dir" ]; then
hg clone https://vim.googlecode.com/ $vim_dir hg clone https://vim.googlecode.com/ "$vim_dir"
fi fi
# Go to workspace # Go to workspace
cd $vim_dir cd "$vim_dir"
# Use latest tagged source code # Use latest tagged source code
hg update -r 'max(tagged())' hg update -r 'max(tagged())'
@ -17,7 +19,7 @@ hg update -r 'max(tagged())'
--enable-pythoninterp \ --enable-pythoninterp \
--enable-rubyinterp \ --enable-rubyinterp \
--enable-gui=gtk2 \ --enable-gui=gtk2 \
--prefix=$LOCAL_PREFIX --prefix="$LOCAL_PREFIX"
# Compile # Compile
make make
@ -25,7 +27,8 @@ make
make install make install
# Link vi to vim out of convenience # Link vi to vim out of convenience
vim_path=$(which vim) vim_path=$(which vim)
sudo ln -s $vim_path ${vim_path:0:(-1)} sudo ln -s "$vim_path" "${vim_path:0:(-1)}"
# Go back to previous directory # Go back to previous directory
cd $ROOT_DIR cd "$ROOT_DIR"
}

0
recipes/no-sudo/test-recipe Normal file → Executable file
View File