cucumber-sp / yandex-music-linux

Linux client of Yandex Music
Other
345 stars 8 forks source link

Add support for NixOS #1

Closed ein-shved closed 8 months ago

ein-shved commented 8 months ago

Additionally - fix some shellcheck warnings in repack.sh

cucumber-sp commented 8 months ago

prompt_yes_no returns 0 as success code, so if you've changed if statements, you also should change that function to return 1 for "y" answer

ein-shved commented 8 months ago

prompt_yes_no returns 0 as success code, so if you've changed if statements, you also should change that function to return 1 for "y" answer

yep. When it return 0, we go into if-statement body and set the corresponding variable to 1

ein-shved commented 8 months ago

prompt_yes_no returns 0 as success code, so if you've changed if statements, you also should change that function to return 1 for "y" answer

yep. When it return 0, we go into if-statement body and set the corresponding variable to 1

Just re-checked this part:

bash -x repack.sh ~/Downloads/Yandex_Music_x64_5.0.6.exe
# ...
+ build_x64=0
+ build_arm64=0
+ prompt_yes_no 'Build for x64?'
+ local 'question=Build for x64?'
+ local response
+ true
+ read -rp 'Build for x64? (y/n): ' response
Build for x64? (y/n): y
+ case $response in
+ return 0
+ build_x64=1
+ prompt_yes_no 'Build for arm64?'
+ local 'question=Build for arm64?'
+ local response
+ true
+ read -rp 'Build for arm64? (y/n): ' response
Build for arm64? (y/n): n
+ case $response in
+ return 1
+ '[' 1 -eq 1 ']'
+ npx electron-forge make --arch=x64