Skip to content

Instantly share code, notes, and snippets.

@speters
Created July 10, 2016 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save speters/95c5ed20a09f718677a616515c9ca66d to your computer and use it in GitHub Desktop.
Save speters/95c5ed20a09f718677a616515c9ca66d to your computer and use it in GitHub Desktop.
#!/bin/bash
SUFFIX="-6"
if ([ "$1" = "-f" ]) ; then
NOP=''
else
NOP='echo'
fi
DIR=/usr/bin
CWD=$(pwd)
for FILE in $(find "${DIR}" -maxdepth 1 -type f -iname "arm-linux*${SUFFIX}") ; do
if ( [ ! -f "${FILE%$SUFFIX}" ] || [ -L "${FILE%$SUFFIX}" ] ) ; then
$NOP ln -sf $(basename "${FILE}") "${FILE%$SUFFIX}"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment