Add TODO markers for SC2012.
This commit is contained in:
		
					parent
					
						
							
								638ddd95d6
							
						
					
				
			
			
				commit
				
					
						ec186673bf
					
				
			
		
					 2 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -33,6 +33,7 @@ destination_dir="${destination%/*}"
 | 
				
			||||||
case "$type" in
 | 
					case "$type" in
 | 
				
			||||||
   symbolic)
 | 
					   symbolic)
 | 
				
			||||||
      cd "$destination_dir" || exit 1
 | 
					      cd "$destination_dir" || exit 1
 | 
				
			||||||
 | 
					      # TODO SC2012: use readlink or something?
 | 
				
			||||||
      source_is=$(ls -l "$destination" | sed 's/.*-> //g')
 | 
					      source_is=$(ls -l "$destination" | sed 's/.*-> //g')
 | 
				
			||||||
      if [ -h "$destination" ]; then
 | 
					      if [ -h "$destination" ]; then
 | 
				
			||||||
         # ignore trailing slashes for comparison
 | 
					         # ignore trailing slashes for comparison
 | 
				
			||||||
| 
						 | 
					@ -52,7 +53,9 @@ case "$type" in
 | 
				
			||||||
         echo sourcemissing
 | 
					         echo sourcemissing
 | 
				
			||||||
         exit 0
 | 
					         exit 0
 | 
				
			||||||
      fi
 | 
					      fi
 | 
				
			||||||
 | 
					      # TODO SC2012: use stat?
 | 
				
			||||||
      destination_inode=$(ls -i "$destination" | awk '{print $1}')
 | 
					      destination_inode=$(ls -i "$destination" | awk '{print $1}')
 | 
				
			||||||
 | 
					      # TODO SC2012: use stat?
 | 
				
			||||||
      source_inode=$(ls -i "$source" | awk '{print $1}')
 | 
					      source_inode=$(ls -i "$source" | awk '{print $1}')
 | 
				
			||||||
      if [ "$destination_inode" -eq "$source_inode" ]; then
 | 
					      if [ "$destination_inode" -eq "$source_inode" ]; then
 | 
				
			||||||
         echo present
 | 
					         echo present
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,6 +31,7 @@ elif [ -f "$destination" ]; then
 | 
				
			||||||
   type="$(cat "$__object/parameter/type")"
 | 
					   type="$(cat "$__object/parameter/type")"
 | 
				
			||||||
   case "$type" in
 | 
					   case "$type" in
 | 
				
			||||||
      hard)
 | 
					      hard)
 | 
				
			||||||
 | 
					         # TODO SC2012: use stat?
 | 
				
			||||||
         link_count=$(ls -l "$destination" | awk '{ print $2 }')
 | 
					         link_count=$(ls -l "$destination" | awk '{ print $2 }')
 | 
				
			||||||
         if [ "$link_count" -gt 1 ]; then
 | 
					         if [ "$link_count" -gt 1 ]; then
 | 
				
			||||||
            echo hardlink
 | 
					            echo hardlink
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue