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
hooks:
- 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
if [ ! -d $WORKSPACE/abuse-the-force ]; then
git clone https://github.com/ViViDboarder/abuse-the-force.git $WORKSPACE/abuse-the-force
if [ ! -d "$WORKSPACE/abuse-the-force" ]; then
git clone https://github.com/ViViDboarder/abuse-the-force.git "$WORKSPACE/abuse-the-force"
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
for f in $DEFAULT_ASSETS_PATH/* ; do
try_link "$f" "$USER_BIN/$(basename $f)"
for f in "$DEFAULT_ASSETS_PATH"/* ; do
try_link "$f" "$USER_BIN/$(basename "$f")"
done

View File

@ -1,4 +1,5 @@
#! /bin/bash
set -e
# in common
# 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
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
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
chmod +x $USER_BIN/force
chmod +x "$USER_BIN/force"
for f in $DEFAULT_ASSETS_PATH/* ; do
try_link "$f" "$USER_BIN/$(basename $f)"
for f in "$DEFAULT_ASSETS_PATH"/* ; do
try_link "$f" "$USER_BIN/$(basename "$f")"
done

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

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

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

@ -2,13 +2,17 @@
log "Compiling and installing fish-shell to local prefix"
local fish_shell_dir=$WORKSPACE/fish-shell
function main() {
local fish_shell_dir=$WORKSPACE/fish-shell
if [ ! -d $fish_shell_dir ]; then
log "Cloning fish-shell"
git clone https://github.com/fish-shell/fish-shell $fish_shell_dir
else
(cd $fish_shell_dir && git pull)
fi
if [ ! -d "$fish_shell_dir" ]; then
log "Cloning fish-shell"
git clone https://github.com/fish-shell/fish-shell "$fish_shell_dir"
else
(cd "$fish_shell_dir" && git pull)
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

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

@ -1,31 +1,34 @@
#!/bin/bash
set -e
local vim_dir="$WORKSPACE/vim"
function main() {
local vim_dir="$WORKSPACE/vim"
# Build latest vim
if [ ! -d $vim_dir ]; then
hg clone https://vim.googlecode.com/ $vim_dir
fi
# Build latest vim
if [ ! -d "$vim_dir" ]; then
hg clone https://vim.googlecode.com/ "$vim_dir"
fi
# Go to workspace
cd $vim_dir
# Go to workspace
cd "$vim_dir"
# Use latest tagged source code
hg update -r 'max(tagged())'
# Configure vim with ruby, python and GTK
./configure --with-features=huge \
--enable-pythoninterp \
--enable-rubyinterp \
--enable-gui=gtk2 \
--prefix=$LOCAL_PREFIX
# Use latest tagged source code
hg update -r 'max(tagged())'
# Configure vim with ruby, python and GTK
./configure --with-features=huge \
--enable-pythoninterp \
--enable-rubyinterp \
--enable-gui=gtk2 \
--prefix="$LOCAL_PREFIX"
# Compile
make
# Install newly compiled vim
make install
# Link vi to vim out of convenience
vim_path=$(which vim)
sudo ln -s $vim_path ${vim_path:0:(-1)}
# Compile
make
# Install newly compiled vim
make install
# Link vi to vim out of convenience
vim_path=$(which vim)
sudo ln -s "$vim_path" "${vim_path:0:(-1)}"
# Go back to previous directory
cd $ROOT_DIR
# Go back to previous directory
cd "$ROOT_DIR"
}

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