25 lines
385 B
Bash
Executable File
25 lines
385 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
if [ -f /etc/os-release ]; then
|
|
. /etc/os-release
|
|
OS=$NAME
|
|
else
|
|
OS="none"
|
|
fi
|
|
|
|
if [ ! -d ~/code_server ]; then
|
|
cd ~ &&
|
|
git clone https://git.cmtec.se/cm/code_server.git
|
|
fi
|
|
|
|
if [ -d ~/code_server ]; then
|
|
cd ~/code_server &&
|
|
git pull &&
|
|
if [ "$OS" == "Ubuntu" ]; then
|
|
./update_ubuntu.sh
|
|
elif [ "$OS" == "Arch Linux" ]; then
|
|
./update_arch.sh
|
|
fi
|
|
fi
|