fix: `compiler`

moving suckless tools to ~/.local/src broke compiler

it's simpler to trim it down and remove useless functions
This commit is contained in:
David JULIEN 2021-05-21 02:00:03 +02:00
parent c8840c4d59
commit d7daaaa8b3
1 changed files with 3 additions and 12 deletions

View File

@ -10,7 +10,7 @@
# groff-mom : compile via pdfmom to a pdf document
# c : compile via gcc
# config.def.h (suckless) : recompile, install
# blocks.def.h (dwmblocks) : recompile, install
# blocks.def.h (dwmblocks) : recompile, install
# tex : compile via pdflatex (bibtex if needed)
######################################################################
@ -21,8 +21,6 @@ dirname=$(basename "$dir")
base="$(printf "${file%.*}" | awk -F '/' '{printf $NF}')"
shebang=$(sed -n 1p "$file")
sucklesstools="$(ls $HOME/.local/src/suckless)"
cd "$dir" || exit
shebangtest()
@ -45,14 +43,6 @@ texcompile() { \
fi
}
s_build(){
case "$file" in
*config.def.h) sudo make clean install ;;
*config.h) printf "\nYou should build from config.def.h !" && exit 1 ;;
*) printf "\nI guess you lost yourself ? Please build from config.def.h !" && exit 1 ;;
esac
}
for tool in $sucklesstools; do
if [ "$tool" = "$dirname" ]; then
s_build
@ -61,7 +51,8 @@ for tool in $sucklesstools; do
done
case "$file" in
*blocks.def.h) make && sudo make clean install ;;
*blocks.def.h) sudo make clean install ;;
*config.def.h) sudo make clean install ;;
*.c*|*.h*) make && ./main ;;
*.mom) refer -PS -e "$file" | pdfmom > "$base.pdf" ;;
*.tex) texcompile "$base" ; texclear "$file" ;;