mirror of
https://github.com/Wind4/vlmcsd.git
synced 2025-05-23 19:26:52 -04:00
Remove binaries from gh-pages branch
This commit is contained in:
parent
a2dea2d90e
commit
2c61e12d97
6 changed files with 366 additions and 3 deletions
51
scripts/install.sh
Normal file
51
scripts/install.sh
Normal file
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# VLMCSD - CentOS/Debian/RedHat/Ubuntu installer
|
||||
#
|
||||
# Author: Wind4 (puxiaping@gmail.com)
|
||||
# Date: November 30, 2015
|
||||
#
|
||||
|
||||
# Detect OS
|
||||
if [ -f /etc/debian_version ]; then
|
||||
ostype='debian'
|
||||
elif [ -f /etc/lsb-release ]; then
|
||||
ostype='ubuntu'
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
ostype='rhel'
|
||||
else
|
||||
echo 'This script only support CentOS/Debian/RedHat/Ubuntu.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Checking wget
|
||||
if [ ! -f /usr/bin/wget ]; then
|
||||
case $ostype in
|
||||
debian|ubuntu)
|
||||
apt-get update -yqq
|
||||
apt-get install -yqq wget
|
||||
;;
|
||||
rhel)
|
||||
yum install -y -q wget
|
||||
;;
|
||||
esac
|
||||
if [ "$?" -ne '0' ]; then
|
||||
echo "Error: Can't install wget" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Select script type
|
||||
case $ostype in
|
||||
debian|ubuntu) type='debian' ;;
|
||||
rhel) type='rhel' ;;
|
||||
esac
|
||||
|
||||
wget https://wind4.github.io/vlmcsd/scripts/install-$type.sh -O vlmcsd-$type.sh
|
||||
if [ "$?" -eq '0' ]; then
|
||||
bash vlmcsd-$type.sh $*
|
||||
exit
|
||||
else
|
||||
echo 'Download installer failed.' >&2
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue