mirror of
				https://github.com/dockersrc/archlinux
				synced 2025-11-04 07:02:16 -05:00 
			
		
		
		
	🗃️ Committing everything that changed 🗃️
rootfs/usr/local/bin/copy rootfs/usr/local/bin/symlink
This commit is contained in:
		@@ -53,15 +53,14 @@ DEFAULT_COLOR="254"
 | 
			
		||||
SYMLINK_EXIT_STATUS=0
 | 
			
		||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
			
		||||
# Main application
 | 
			
		||||
if [ $# -ne 2 ] || [ ! -e "$1" ]; then
 | 
			
		||||
  __printf_color "Usage: $APPNAME from to"
 | 
			
		||||
  exit 1
 | 
			
		||||
else
 | 
			
		||||
  if [ -L "$2" ]; then
 | 
			
		||||
    unlink "$2"
 | 
			
		||||
  elif [ -e "$2" ]; then
 | 
			
		||||
    rm -Rf "$2"
 | 
			
		||||
  fi
 | 
			
		||||
{ [ $# -eq 2 ] || [ "$1" = "--help" ]; } || { __printf_color "Usage: $APPNAME fromFile toFile" && exit 1; }
 | 
			
		||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
			
		||||
if [ -L "$2" ]; then
 | 
			
		||||
  unlink "$2"
 | 
			
		||||
elif [ -e "$2" ]; then
 | 
			
		||||
  rm -Rf "$2"
 | 
			
		||||
fi
 | 
			
		||||
if [ -e "$1" ]; then
 | 
			
		||||
  ln -sf "$1" "$2"
 | 
			
		||||
  SYMLINK_EXIT_STATUS=$?
 | 
			
		||||
fi
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user