diff options
author | Antonio García-Domínguez <nyoescape@gmail.com> | 2016-06-04 21:59:20 +0100 |
---|---|---|
committer | Antonio García-Domínguez <nyoescape@gmail.com> | 2016-06-04 21:59:20 +0100 |
commit | a179d035d7772679ea2e377f5aa09fa4e0bf8011 (patch) | |
tree | c471e8c4f18b6485dbeb7b1c38a7d67b7e468856 | |
parent | d2d81c65ce2ea45ec52e48814e92c5a922934339 (diff) | |
parent | 98ae8ecb303e9a08c63e73817c1a2ed7bfef33d8 (diff) |
Merge pull request #27 from laptander/master
Fix some Arch related issues
-rw-r--r--[-rwxr-xr-x] | prepare-videochat.sh | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/prepare-videochat.sh b/prepare-videochat.sh index 0671882..5bc66e0 100755..100644 --- a/prepare-videochat.sh +++ b/prepare-videochat.sh @@ -129,7 +129,15 @@ GST_FPS=5 ### FUNCTIONS has_kernel_module() { - sudo modprobe -q "$1" > /dev/null 2>&1 + # Loads module if it is not yet loaded + MODULE="$1" + if lsmod | grep "$MODULE" &> /dev/null ; then + # echo "$MODULE is loaded! Do nothnig." + : + else + echo "Module $MODULE is not loaded. Trying to load it." + sudo modprobe -q "$MODULE" > /dev/null 2>&1 + fi } error() { @@ -217,7 +225,8 @@ GST_0_10_VIDEO_MIMETYPE=$GST_VIDEO_MIMETYPE GST_0_10_VIDEO_FORMAT=$GST_VIDEO_FORMAT if [ $DIST = "Debian" -a `echo "$RELEASE >= 8.0" | bc` -eq 1 ] ||\ - [ $DIST = "Ubuntu" -a `echo "$RELEASE >= 14.04" | bc` -eq 1 ] + [ $DIST = "Ubuntu" -a `echo "$RELEASE >= 14.04" | bc` -eq 1 ] ||\ + [ $DIST = "Arch" ] then GST_VER="1.0" GST_VIDEO_CONVERTER="videoconvert" @@ -253,8 +262,8 @@ if ! has_kernel_module v4l2loopback; then if [ $? != 0 ]; then info "Installation failed. Please install v4l2loopback manually from github.com/umlaeute/v4l2loopback." fi - elif can_run yaourt; then - yaourt -S v4l2loopback-git + elif [ $DIST = "Arch" ]; then + yaourt -S v4l2loopback-dkms fi if has_kernel_module v4l2loopback; then @@ -265,7 +274,7 @@ if ! has_kernel_module v4l2loopback; then fi # check if the user has the pulse gst plugin installed -if find /usr/lib -path "*/gstreamer-$GST_VER/libgstpulse.so" | egrep -q '.*'; then +if find "/usr/lib/gstreamer-$GST_VER/libgstpulse.so" | egrep -q '.*'; then # lc # plugin installed, do nothing info "Found the pulse gst plugin" else |