get_peertube_videos/install.sh
2024-11-19 11:54:20 +02:00

29 lines
703 B
Bash
Executable file

#!/bin/bash
destination="/usr/local/bin"
while [ $# -gt 0 ]
do
case "$1" in
"--help"|"-h"|"-?")
usage
exit 0
;;
"--destination"|"-d")
shift
destination="${1}"
shift
;;
*)
echo "Ignoring unknwon parameter '${1}'"
shift
;;
esac
done
if [ ! -e "${HOME}/.config/get_peertube_videos.conf" ]; then
touch "${HOME}/.config/get_peertube_videos.conf"
fi
chmod go-rwx "${HOME}/.config/get_peertube_videos.conf"
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
sed "s#__src_folder__#${script_dir}#g" wrapper.sh > "${destination}/get_peertube_videos.sh"
chmod +x "${destination}/get_peertube_videos.sh"