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:
parent
c8840c4d59
commit
d7daaaa8b3
@ -21,8 +21,6 @@ dirname=$(basename "$dir")
|
|||||||
base="$(printf "${file%.*}" | awk -F '/' '{printf $NF}')"
|
base="$(printf "${file%.*}" | awk -F '/' '{printf $NF}')"
|
||||||
shebang=$(sed -n 1p "$file")
|
shebang=$(sed -n 1p "$file")
|
||||||
|
|
||||||
sucklesstools="$(ls $HOME/.local/src/suckless)"
|
|
||||||
|
|
||||||
cd "$dir" || exit
|
cd "$dir" || exit
|
||||||
|
|
||||||
shebangtest()
|
shebangtest()
|
||||||
@ -45,14 +43,6 @@ texcompile() { \
|
|||||||
fi
|
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
|
for tool in $sucklesstools; do
|
||||||
if [ "$tool" = "$dirname" ]; then
|
if [ "$tool" = "$dirname" ]; then
|
||||||
s_build
|
s_build
|
||||||
@ -61,7 +51,8 @@ for tool in $sucklesstools; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
case "$file" in
|
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 ;;
|
*.c*|*.h*) make && ./main ;;
|
||||||
*.mom) refer -PS -e "$file" | pdfmom > "$base.pdf" ;;
|
*.mom) refer -PS -e "$file" | pdfmom > "$base.pdf" ;;
|
||||||
*.tex) texcompile "$base" ; texclear "$file" ;;
|
*.tex) texcompile "$base" ; texclear "$file" ;;
|
||||||
|
Reference in New Issue
Block a user