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}')"
|
||||
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" ;;
|
||||
|
Reference in New Issue
Block a user