mirror of
				https://github.com/cucumber-sp/yandex-music-linux.git
				synced 2025-10-31 03:42:39 +03:00 
			
		
		
		
	Fixed license setting
This commit is contained in:
		
							
								
								
									
										34
									
								
								repack.sh
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								repack.sh
									
									
									
									
									
								
							| @@ -25,17 +25,14 @@ usage() { | |||||||
|     echo |     echo | ||||||
|     echo " Options:" |     echo " Options:" | ||||||
|     echo " -x     Extract and fix only to ./app folder" |     echo " -x     Extract and fix only to ./app folder" | ||||||
|     echo " -l     Do not update license" |  | ||||||
|     echo " -h     Show this help and exit" |     echo " -h     Show this help and exit" | ||||||
| } | } | ||||||
|  |  | ||||||
| extract_only= | extract_only= | ||||||
| exe_location= | exe_location= | ||||||
| update_license=1 |  | ||||||
| while getopts :xlh name; do | while getopts :xlh name; do | ||||||
|     case $name in |     case $name in | ||||||
|     x) extract_only=1 ;; |     x) extract_only=1 ;; | ||||||
|     l) update_license= ;; |  | ||||||
|     h) |     h) | ||||||
|         usage |         usage | ||||||
|         exit 0 |         exit 0 | ||||||
| @@ -72,18 +69,6 @@ rm "./app.asar" | |||||||
|  |  | ||||||
| cd ./app | cd ./app | ||||||
|  |  | ||||||
| if [ -z "$update_license" ]; then |  | ||||||
|     # updating license |  | ||||||
|     if ! command -v jq &>/dev/null; then |  | ||||||
|         echo "Error: jq is not installed. Please install jq to proceed." >&2 |  | ||||||
|         exit 1 |  | ||||||
|     fi |  | ||||||
|     jq --arg license "UNLICENSED" '. + {license: $license}' package.json > tmp_package.json |  | ||||||
|     mv tmp_package.json package.json |  | ||||||
|     echo "Updated license field in package.json" |  | ||||||
|     version=$(jq -r .version package.json) |  | ||||||
| fi |  | ||||||
|  |  | ||||||
| # fixing secretKey issue | # fixing secretKey issue | ||||||
| echo "Fixing SecretKey" | echo "Fixing SecretKey" | ||||||
| find "./" -type f \( -name "*.js" -o -name "*.js.map" \) -print0 | while IFS= read -r -d $'\0' file; do | find "./" -type f \( -name "*.js" -o -name "*.js.map" \) -print0 | while IFS= read -r -d $'\0' file; do | ||||||
| @@ -152,6 +137,25 @@ forge_config="module.exports = { | |||||||
| echo Writing Forge Config... | echo Writing Forge Config... | ||||||
| echo "$forge_config" > ./forge.config.js | echo "$forge_config" > ./forge.config.js | ||||||
|  |  | ||||||
|  |  | ||||||
|  | update_license=0 | ||||||
|  | if prompt_yes_no "In order to build the app we'll need to update the license field in package.json. Continue?"; then | ||||||
|  |     update_license=1 | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | if [ "$update_license" -eq 1 ]; then | ||||||
|  |     exit 0 | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | if ! command -v jq &>/dev/null; then | ||||||
|  |   echo "Error: jq is not installed. Please install jq to proceed." >&2 | ||||||
|  |   exit 1 | ||||||
|  | fi | ||||||
|  | jq --arg license "UNLICENSED" '. + {license: $license}' package.json > tmp_package.json | ||||||
|  | mv tmp_package.json package.json | ||||||
|  | echo "Updated license field in package.json" | ||||||
|  | version=$(jq -r .version package.json) | ||||||
|  |  | ||||||
| build_x64=0 | build_x64=0 | ||||||
| build_arm64=0 | build_arm64=0 | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user