30 lines
718 B
Bash
30 lines
718 B
Bash
|
#!/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/publish_active_windows.conf" ]; then
|
||
|
touch "${HOME}/.config/publish_active_windows.conf"
|
||
|
fi
|
||
|
chmod go-rwx "${HOME}/.config/publish_active_windows.conf"
|
||
|
|
||
|
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||
|
sed "s#__src_folder__#${script_dir}#g" wrapper.sh > "${destination}/publish_active_windows.sh"
|
||
|
chmod +x "${destination}/publish_active_windows.sh"
|