Dotfiles/bin/open-local
2019-02-21 14:13:41 +00:00

21 行
428 B
Bash
可执行文件

#!/bin/zsh
# absolute path to image folder
FOLDER="$PWD"
PH="${${PWD%/public_html*}%/wiki*}"
FILE="https://${PH##*/}.local.jh"
# get current open browser command
case $( uname -s ) in
Darwin) open=open;;
MINGW*) open=start;;
CYGWIN*) open=cygstart;;
MSYS*) open="powershell.exe –NoProfile Start";;
*) open=${BROWSER:-xdg-open};;
esac
# open it in a browser
$open "$FILE" &> /dev/null & disown
exit $?