diff --git a/bin/linux/premake5 b/bin/linux/premake5 new file mode 100644 index 0000000..bcb51ce Binary files /dev/null and b/bin/linux/premake5 differ diff --git a/bin/windows/bakasable.exe b/bin/windows/bakasable.exe index 20033f9..b0e301c 100644 Binary files a/bin/windows/bakasable.exe and b/bin/windows/bakasable.exe differ diff --git a/setup.bat b/setup.bat index 5f02fd1..c849826 100644 --- a/setup.bat +++ b/setup.bat @@ -1,5 +1,7 @@ @echo off +cd %~dp0 + echo Installing bakasable md "C:\Program Files\bakasable" @@ -9,4 +11,6 @@ md "C:\Program Files\bakasable\cache" xcopy /y .\bin\windows\bakasable.exe "C:\Program Files\bakasable" xcopy /y .\bin\windows\premake5.exe "C:\Program Files\bakasable" -powershell .\path.ps1 \ No newline at end of file +powershell .\path.ps1 + +pause \ No newline at end of file diff --git a/setup.sh b/setup.sh index 45eb947..20c23aa 100755 --- a/setup.sh +++ b/setup.sh @@ -1,8 +1,11 @@ echo Installing bakasable +cd $(dirname "$0") + handle_error() { echo "An error occurred on line $1" rm -rf ~/.bakasable + cd $(pwd) exit 1 } trap 'handle_error $LINENO' ERR @@ -10,6 +13,17 @@ trap 'handle_error $LINENO' ERR mkdir -m 777 ~/.bakasable mkdir ~/.bakasable/cache -cp ./bin/linux/bakasable ~/.bakasable/ +cp -f ./bin/linux/bakasable ~/.bakasable/ +if [ ! $(witch premake5) ]; then + cp -f ./bin/linux/premake5 ~/.bakasable/ +fi -echo "export PATH=$PATH:~/.bakasable" >> ~/.bashrc +echo Searching path in env PATH +if [ ! $(witch bakasable) ]; then + echo Path not found in env PATH + echo Adding path + echo "export PATH=$PATH:~/.bakasable" >> ~/.bashrc +else + echo Path already added +fi +cd $(pwd) \ No newline at end of file