|
@@ -16,11 +16,39 @@ timeHuman=$(date -d "@$(($time/1000))")
|
|
|
echo "$timeHuman"
|
|
|
sleep 3
|
|
|
|
|
|
-echo "Updating apt"
|
|
|
-sudo apt upgrade -y
|
|
|
-sudo apt-get update -y
|
|
|
-sudo apt-get install ffmpeg samba git net-tools unzip -y
|
|
|
+echo "Installing necessary packages..."
|
|
|
|
|
|
+if [ -f /etc/os-release ]; then
|
|
|
+ # freedesktop.org and systemd
|
|
|
+ . /etc/os-release
|
|
|
+ OS=$NAME
|
|
|
+elif type lsb_release >/dev/null 2>&1; then
|
|
|
+ # linuxbase.org
|
|
|
+ OS=$(lsb_release -si)
|
|
|
+elif [ -f /etc/lsb-release ]; then
|
|
|
+ # For some versions of Debian/Ubuntu without lsb_release command
|
|
|
+ . /etc/lsb-release
|
|
|
+ OS=$DISTRIB_ID
|
|
|
+elif [ -f /etc/debian_version ]; then
|
|
|
+ # Older Debian/Ubuntu/etc.
|
|
|
+ OS=Debian
|
|
|
+else
|
|
|
+ # Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
|
|
|
+ OS=$(uname -s)
|
|
|
+fi
|
|
|
+
|
|
|
+if [[ $OS == "Amazon Linux" ]]; then
|
|
|
+ echo "YUM Package Manager"
|
|
|
+ sudo yum update
|
|
|
+ sudo yum install ffmpeg samba git net-tools unzip -y
|
|
|
+else
|
|
|
+#elif [[ $OS == "Debian" ]]; then
|
|
|
+ echo "APT Package Manager"
|
|
|
+ sudo apt upgrade -y
|
|
|
+ sudo apt-get update -y
|
|
|
+ sudo apt-get install ffmpeg samba git net-tools unzip -y
|
|
|
+fi
|
|
|
+
|
|
|
echo "Installing Web components from Jenkins..."
|
|
|
wget $server/job/arozos/lastSuccessfulBuild/artifact/arozos_web_components.zip
|
|
|
unzip arozos_web_components.zip
|
|
@@ -33,6 +61,9 @@ echo "Installing Core binary from Jenkins...."
|
|
|
arch=$(uname -i)
|
|
|
sysname=$(uname | tr '[:upper:]' '[:lower:]')
|
|
|
echo "Your system is $sysname"
|
|
|
+if [[ $arch == "x86_64" ]]; then
|
|
|
+ arch="i386"
|
|
|
+fi
|
|
|
if [[ $arch == "unknown" ]]; then
|
|
|
echo "Unknown CPU arch. Please enter CPU architecture manually (arm/arm64/amd64/i386/armv7/misple)"
|
|
|
read -p "Architecture: " arch
|