2021-06-28 18:51:15 +02:00
|
|
|
#!/bin/bash
|
2021-06-26 16:42:04 +02:00
|
|
|
tmp_dir=$(mktemp -d)/peertube-plugin-auto-import-ytb/
|
2021-06-28 18:51:15 +02:00
|
|
|
work_dir=$(pwd)
|
|
|
|
peertube_dir=${1}
|
|
|
|
if [ ! -d "${peertube_dir}" ]; then
|
|
|
|
echo "Expected to be passed a directory (or ${peertube_dir} is not accessible)" > /dev/stderr
|
|
|
|
exit 1
|
|
|
|
fi
|
2021-06-26 16:42:04 +02:00
|
|
|
# echo $work_dir
|
|
|
|
|
2021-06-28 18:51:15 +02:00
|
|
|
mkdir "$tmp_dir"
|
2021-06-26 16:42:04 +02:00
|
|
|
# echo "directory created"
|
2021-06-28 18:51:15 +02:00
|
|
|
rsync --exclude-from="${work_dir}/.rsyncignore" "${work_dir}" "${tmp_dir}" -ar
|
2021-06-26 16:42:04 +02:00
|
|
|
# echo "rsync --exclude-from=$work_dir.rsyncignore $work_dir $tmp_dir"
|
|
|
|
# echo "rsync done"
|
|
|
|
cd ../PeerTube
|
2021-06-28 18:51:15 +02:00
|
|
|
node ./dist/server/tools/peertube.js plugins install --path "${tmp_dir}"
|
2021-06-26 16:42:04 +02:00
|
|
|
# echo $tmp_dir
|