.dotfiles/configs/zsh/functions/run.zsh

12 lines
197 B
Bash
Raw Normal View History

2022-03-01 23:25:44 +01:00
function run(){
HAS_MAKE="$(ls | grep Makefile)"
HAS_PACKAGE="$(ls | grep package.json)"
if [ "$HAS_PACKAGE" != "" ]; then
pnpm $1
elif [ "$HAS_MAKE" != "" ]; then
make $1
fi
}