mirror of
				https://github.com/siderolabs/talos.git
				synced 2025-10-31 16:31:13 +01:00 
			
		
		
		
	This will fix running these scripts on distros without /bin/bash, but where bash is in $PATH, such as NixOS. Currently, `make fmt` otherwise fails to run: ``` make[3]: Leaving directory '/home/flokli/dev/numtide/manifoldfinance/talos' sh: ./hack/fix-artifacts.sh: /bin/bash: bad interpreter: No such file or directory make[2]: *** [Makefile:163: local-fmt-protobuf] Error 126 make[2]: Leaving directory '/home/flokli/dev/numtide/manifoldfinance/talos' make[1]: *** [Makefile:274: fmt-protobuf] Error 2 make[1]: Leaving directory '/home/flokli/dev/numtide/manifoldfinance/talos' make: *** [Makefile:277: fmt] Error 2 ``` Signed-off-by: Florian Klink <flokli@flokli.de> Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
		
			
				
	
	
		
			13 lines
		
	
	
		
			290 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			290 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| 
 | |
| for platform in $(tr "," "\n" <<< "${PLATFORM}"); do
 | |
|     echo ${platform}
 | |
|     directory="${platform//\//_}"
 | |
| 
 | |
|     if [[ -d "${ARTIFACTS}/${directory}" ]]; then
 | |
|         mv "${ARTIFACTS}/${directory}/"* ${ARTIFACTS}
 | |
| 
 | |
|         rmdir "${ARTIFACTS}/${directory}/"
 | |
|     fi
 | |
| done
 |