What does -L $package_path mean or do in the following code?
PACKAGES=(a b c)
COLORS=(32 33 34 35 36 32)
PACKAGE_LINK_PATHS=(false false false false false false)
SECONDS=0
esc=$(printf '\e')
for index in "${!PACKAGES[@]}"
do package_name="${PACKAGES[$index]}" package_path="node_modules/somewhere/${package_name}" color_code="${COLORS[$index]}" if [ -L $package_path ]; then if [ $unlinkPackages = true ]; then printf "Unlinking ${package_name}\n" else # Cache the currently linked package path PACKAGE_LINK_PATHS[$index]=$(readlink $package_path) fi rm -rf $package_path fi
done 1 Answer
if [ -Lmeans "test for symlink".
The printf "Unlinking ${package_name}\n" is a big clue ;)
And man bash explains it too (search for -L):
-L file True if file exists and is a symbolic link. 5