mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	
		
			
	
	
		
			12 lines
		
	
	
	
		
			161 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
		
		
			
		
	
	
			12 lines
		
	
	
	
		
			161 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| 
								 | 
							
								#!/bin/sh -eu
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								var=${1:-data}
							 | 
						||
| 
								 | 
							
								hex="$(od -A n -t x1 -v)"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								echo "static const char $var[] = {"
							 | 
						||
| 
								 | 
							
								for byte in $hex; do
							 | 
						||
| 
								 | 
							
									echo "	0x$byte,"
							 | 
						||
| 
								 | 
							
								done
							 | 
						||
| 
								 | 
							
								echo "	0x00,"
							 | 
						||
| 
								 | 
							
								echo "};"
							 |