Browse Source

modifly some justly for filer

gemer 4 years ago
parent
commit
6aa0b740a4
5 changed files with 76 additions and 35 deletions
  1. 0 0
      4dage-ffmpeg
  2. 3 3
      install-4dage
  3. 29 29
      install-ffmpeg
  4. 3 3
      vagrant-installer.sh
  5. 41 0
      web-install.sh

4dage-ffmpeg.sh → 4dage-ffmpeg


+ 3 - 3
install-4dage

@@ -1,5 +1,5 @@
 #!/bin/bash
 
-cat <(curl -s http://192.168.0.115:3000/zhangyupeng/4dage-ffmpeg/src/b7ebf1fa1fdd0ba1af370cb76e067c879da54d9f/4dage-ffmpeg.sh) > /usr/local/4dage-ffmpeg
-chmod a+x /usr/local/4dage-ffmpeg
-ln -s /usr/local/4dage-ffmpeg /usr/bin/4dage-ffmpeg
+cat <(curl -s http://192.168.0.115:3000/zhangyupeng/4dage-ffmpeg/src/b7ebf1fa1fdd0ba1af370cb76e067c879da54d9f/4dage-ffmpeg.sh) > /usr/local/4dage-ffmpeg/4dage-ffmpeg
+chmod a+x /usr/local/4dage-ffmpeg/4dage-ffmpeg
+ln -s /usr/local/4dage-ffmpeg/4dage-ffmpeg /usr/bin/4dage-ffmpeg

+ 29 - 29
install-ffmpeg

@@ -1,5 +1,5 @@
 #!/bin/bash
-# export http_proxy=http://192.168.0.144:7890   https_proxy=http://192.168.0.144:7890 
+# export http_proxy=http://192.168.0.144:7890   https_proxy=http://192.168.0.144:7890
 
 PROGNAME=$(basename "$0")
 VERSION=1.22
@@ -742,34 +742,34 @@ fi
 ## build lv2 speech-denoiser
 ##
 
-# build "speech-denoiser"
-# if ! command_exists "git"; then
-#   sudo apt-get install -y git
-# fi
-
-# if [ ! -d "$WORKSPACE/speech-denoiser" ]; then
-#   git clone https://github.com/lucianodato/speech-denoiser.git "$WORKSPACE/speech-denoiser"
-# fi
-
-# cd "$WORKSPACE/speech-denoiser"
-# sudo apt-get install -y ninja-build python3-pip
-# if command_exists "python3"; then
-#   pyv="$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:3])))' 2>&1)"
-#   laverison="3.5.2"
-#   echo "$pyv"
-#   # if [ 1 -eq "$(echo "${pyv} > ${laverison}" | bc)" ];then
-#   sudo apt-get remove python3.4 -y
-#   sudo apt-get install software-properties-common python-software-properties -y
-#   sudo add-apt-repository ppa:deadsnakes/ppa -y
-#   sudo apt-get update -y
-#   sudo apt-get install python3-pip python3.6 -y
-#   # fi
+build "speech-denoiser"
+if ! command_exists "git"; then
+  sudo apt-get install -y git
+fi
+
+if [ ! -d "$WORKSPACE/speech-denoiser" ]; then
+  git clone https://github.com/lucianodato/speech-denoiser.git "$WORKSPACE/speech-denoiser"
+fi
+
+cd "$WORKSPACE/speech-denoiser"
+sudo apt-get install -y ninja-build python3-pip
+if command_exists "python3"; then
+  pyv="$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:3])))' 2>&1)"
+  laverison="3.5.2"
+  echo "$pyv"
+  # if [ 1 -eq "$(echo "${pyv} > ${laverison}" | bc)" ];then
+  sudo apt-get remove python3.4 -y
+  sudo apt-get install software-properties-common python-software-properties -y
+  sudo add-apt-repository ppa:deadsnakes/ppa -y
+  sudo apt-get update -y
+  sudo apt-get install python3-pip python3.6 -y
+  # fi
+  sudo pip3 install meson
+# else
+#   sudo apt-get install -y python3-pip
 #   sudo pip3 install meson
-# # else
-# #   sudo apt-get install -y python3-pip
-# #   sudo pip3 install meson
-# fi
-# chmod +x install.sh && ./install.sh
-# build_done "speech-denoiser"
+fi
+chmod +x install.sh && ./install.sh
+build_done "speech-denoiser"
 
 exit 0

+ 3 - 3
vagrant-installer.sh

@@ -1,6 +1,6 @@
 #!/bin/sh
-
-sudo apt-get install build-essential -y
+sudo apt-get update -y
+sudo apt-get install build-essential pkg-config autoconf m4 libtool -y
 # sudo apt install nvidia-cuda-toolkit -y
 
-bash /vagrant/install-ffmpeg --build 
+bash /vagrant/install-ffmpeg --build > /var/log/install-ffmpeg.log

+ 41 - 0
web-install.sh

@@ -0,0 +1,41 @@
+#!/bin/sh
+
+make_dir () {
+    if [ ! -d $1 ]; then
+        if ! mkdir $1; then            
+            printf "\n Failed to create dir %s" "$1";
+            exit 1
+        fi
+    fi    
+}
+
+command_exists() {
+    if ! [[ -x $(command -v "$1") ]]; then
+        return 1
+    fi
+
+    return 0
+}
+
+TARGET='ffmpeg-build'
+
+if ! command_exists "curl"; then
+    echo "curl not installed.";
+    exit 1
+fi
+
+echo "4dage ffmpeg-build-script-downloader v0.1"
+echo "========================================="
+echo ""
+
+echo "First we create the ffmpeg build directory $TARGET"
+make_dir $TARGET
+cd $TARGET
+
+echo "Now we download and execute the build script"
+echo ""
+
+bash <(curl -s  ) --build
+bash <(curl -s )
+
+