fix(build_library): use ln -sf instead of if

we don't need an if statement when we can force.
This commit is contained in:
Brandon Philips 2014-03-13 12:05:33 -07:00
parent 9ce005cf88
commit ed19e9f559

View File

@ -112,10 +112,7 @@ EOF
# The first time through the image, we have an os-release from a package, # The first time through the image, we have an os-release from a package,
# the second time through this script, we don't, so we need to test if it's # the second time through this script, we don't, so we need to test if it's
# present before trying to remove it. # present before trying to remove it.
if [[ -a "${ROOT_FS_DIR}/etc/os-release" ]] ; then sudo ln -sf "../usr/share/coreos/os-release" "${ROOT_FS_DIR}/etc/os-release"
sudo rm "${ROOT_FS_DIR}/etc/os-release"
fi
sudo ln -s "../usr/share/coreos/os-release" "${ROOT_FS_DIR}/etc/os-release"
# Create the defaults for the coreos configuration files in the usr directory # Create the defaults for the coreos configuration files in the usr directory
sudo_clobber "${ROOT_FS_DIR}/usr/share/coreos/release" <<EOF sudo_clobber "${ROOT_FS_DIR}/usr/share/coreos/release" <<EOF