blob: 58e1e2fd81bac5c6fc3f2889c4112afc6e83a129 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/sh
premake5 gmake
make
if [ ! -d ~/.lush ]; then
cp -rf ./.lush ~/
fi
# always update example
cp -f ./.lush/scripts/example.lua ~/.lush/scripts/example.lua
# Install the new shell binary to a temporary location
sudo cp ./bin/Debug/lush/lush /usr/bin/lush.new
# Atomically replace the old binary
sudo mv /usr/bin/lush.new /usr/bin/lush
# Ensure the shell is registered in /etc/shells
if ! grep -Fxq "/usr/bin/lush" /etc/shells; then
echo "/usr/bin/lush" | sudo tee -a /etc/shells >/dev/null
fi
echo "====================="
echo " UPDATE FINISHED "
echo "====================="
|