Skip to content
Snippets Groups Projects
Commit ff6866d6 authored by Bob Mottram's avatar Bob Mottram
Browse files

Use basename to avoid slashes

parent d3e6ffb0
No related branches found
No related tags found
No related merge requests found
......@@ -110,10 +110,10 @@ function peertube_import_from_syncthing {
echo " peertubetitle=\$(basename \"\$video_file\" | awk -F '.' '{print \$1}' | sed 's|_| |g' | sed 's|-| |g')";
echo " if $nodecmd \$import_script -n \$peertubetitle \$peertubensfw \$peertubeprivate -u \"\$peertubedomain\" -U \"\$peertubeuser\" --password \"\$peertubepassword\" -f \"\$video_file\"; then";
echo " echo \"\$video_file\" >> /root/.peertube_uploaded";
echo " sed -i \"/\$video_file/d\" /root/.peertube_uploading";
echo " sed -i \"/\$(basename \$video_file)/d\" /root/.peertube_uploading";
echo " exit 0";
echo ' else';
echo " sed -i \"/\$video_file/d\" /root/.peertube_uploading";
echo " sed -i \"/\$(basename \$video_file)/d\" /root/.peertube_uploading";
echo " failed_uploads=\$((failed_uploads+1))";
echo " if [ \$failed_uploads -gt 1 ]; then";
echo ' exit 0';
......@@ -122,7 +122,7 @@ function peertube_import_from_syncthing {
echo ' fi';
echo ' else';
echo " if grep -q \"\$video_file\" /root/.peertube_uploading; then";
echo " sed -i \"/\$video_file/d\" /root/.peertube_uploading";
echo " sed -i \"/\$(basename \$video_file)/d\" /root/.peertube_uploading";
echo ' fi';
echo ' fi';
echo ' fi';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment