aboutsummaryrefslogtreecommitdiffstats
path: root/install.sh
diff options
context:
space:
mode:
authorGravatar BanceDev 2024-09-02 22:55:24 -0400
committerGravatar BanceDev 2024-09-02 22:55:24 -0400
commitebdd4e88db2738197dd4a47903f28253cfc103e0 (patch)
treea9a5e7dd6b57dfa18fdafec0cf912042468a5f56 /install.sh
parentadded arrow key movement (diff)
added basic lua scripting
added exec function to run shell commands from lua
Diffstat (limited to 'install.sh')
-rw-r--r--install.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/install.sh b/install.sh
index 68b7238..704de75 100644
--- a/install.sh
+++ b/install.sh
@@ -1,5 +1,42 @@
#!/bin/sh
+# Function to install packages using apt (Debian/Ubuntu)
+install_with_apt() {
+ sudo apt-get update
+ sudo apt-get install -y lua5.4 liblua5.4-dev
+}
+
+# Function to install packages using yum (Red Hat/CentOS)
+install_with_yum() {
+ sudo yum install -y epel-release
+ sudo yum install -y lua lua-devel
+}
+
+# New package manager used in Fedora
+install_with_dnf() {
+ sudo dnf install -y lua lua-devel
+}
+
+# Function to install packages using pacman (Arch Linux)
+install_with_pacman() {
+ sudo pacman -Sy --noconfirm lua
+}
+
+if [ -f /etc/arch-release ]; then
+ install_with_pacman
+elif [ -f /etc/debian_version ]; then
+ install_with_apt
+elif [ -f /etc/redhat-release ] || [ -f /etc/centos-release ]; then
+ if command -v dnf >/dev/null 2>&1; then
+ install_with_dnf
+ else
+ install_with_yum
+ fi
+else
+ echo "Your linux distro is not supported currently."
+ echo "You need to manually install those packages: exiftool, jq, glfw"
+fi
+
PREMAKE_VERSION="5.0.0-beta2"
OS="linux"
@@ -14,6 +51,7 @@ rm premake.tar.gz
premake5 gmake
make
+cp -rf ./.lush ~/
# Install the new shell binary to a temporary location
sudo cp ./bin/Debug/lush/lush /usr/bin/lush.new