make install DESTDIR="$INSTALL_ROOT" &&

if [[ $NANO_SELECTED_CONFIG == nanorc-sample ]]; then
  install_config_file doc/nanorc.sample "$INSTALL_ROOT/etc/nanorc"
elif [[ "${NANO_SELECTED_CONFIG}" != "" ]] ; then
  install_config_file "$SPELL_DIRECTORY/spell-config/$NANO_SELECTED_CONFIG" \
                      "$INSTALL_ROOT/etc/nanorc"
fi &&

install -vm 755 -d "$INSTALL_ROOT/etc/profile.d" &&
if install_config_file "$SPELL_DIRECTORY/profile.d/editor.sh" \
                       "$INSTALL_ROOT/etc/profile.d/editor.sh"; then
  chmod 0755 "$INSTALL_ROOT/etc/profile.d/editor.sh"
fi
