mirror of
				https://codeberg.org/dwl/dwl.git
				synced 2025-10-27 02:04:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			249 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			249 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| if git tag --contains HEAD | grep -q $1; then
 | |
| 	echo $1
 | |
| else
 | |
| 	branch="$(git rev-parse --abbrev-ref HEAD)"
 | |
| 	commit="$(git rev-parse --short HEAD)"
 | |
| 	if [ "${branch}" != "main" ]; then
 | |
| 		echo $1-$branch-$commit
 | |
| 	else
 | |
| 		echo $1-$commit
 | |
| 	fi
 | |
| fi
 | 
