mirror of
https://github.com/koush/scrypted.git
synced 2026-03-06 19:22:00 +00:00
45 lines
930 B
Bash
Executable File
45 lines
930 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
if [ "$USER" == "root" ]
|
|
then
|
|
echo "Installation must not be run as 'root'."
|
|
exit 1
|
|
fi
|
|
|
|
set -x
|
|
|
|
RUN() {
|
|
$@
|
|
if [ "$?" != "0" ]
|
|
then
|
|
echo 'Error during previous command.'
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
echo "Installing Scrypted dependencies..."
|
|
# needed by scrypted-ffmpeg
|
|
RUN brew install sdl2
|
|
# gstreamer plugins
|
|
RUN brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly
|
|
# gst python bindings
|
|
RUN brew install gst-python
|
|
RUN pip3 install --upgrade pip
|
|
RUN pip3 install aiofiles debugpy typing_extensions typing opencv-python
|
|
|
|
echo "Installing Scrypted..."
|
|
RUN npx -y scrypted install-server
|
|
|
|
set +x
|
|
echo
|
|
echo
|
|
echo
|
|
echo
|
|
echo "Launch Scrypted with the following:"
|
|
echo " npx -y scrypted serve"
|
|
echo
|
|
echo "Follow these instructions to create a service that runs on boot:"
|
|
echo " https://github.com/koush/scrypted/wiki/Local-Installation#mac"
|
|
echo
|
|
echo
|