mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Prevent garbage toml-e files on macOS
Newer macOS versions output `uname` as "Darwin", while older versions output "darwin".
This commit is contained in:
parent
1d80a4075f
commit
09e4c3e12b
1 changed files with 12 additions and 8 deletions
20
publish.sh
20
publish.sh
|
@ -8,15 +8,19 @@ cd $WORKINGDIR
|
||||||
|
|
||||||
crates=( "protocol" "oauth" "core" "discovery" "audio" "metadata" "playback" "connect" "librespot" )
|
crates=( "protocol" "oauth" "core" "discovery" "audio" "metadata" "playback" "connect" "librespot" )
|
||||||
|
|
||||||
OS=`uname`
|
|
||||||
function replace_in_file() {
|
function replace_in_file() {
|
||||||
if [ "$OS" == 'darwin' ]; then
|
OS=`uname`
|
||||||
# for MacOS
|
shopt -s nocasematch
|
||||||
sed -i '' -e "$1" "$2"
|
case "$OS" in
|
||||||
else
|
darwin)
|
||||||
# for Linux and Windows
|
# for macOS
|
||||||
sed -i'' -e "$1" "$2"
|
sed -i '' -e "$1" "$2"
|
||||||
fi
|
;;
|
||||||
|
*)
|
||||||
|
# for Linux and Windows
|
||||||
|
sed -i'' -e "$1" "$2"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
function switchBranch {
|
function switchBranch {
|
||||||
|
|
Loading…
Reference in a new issue