diff --git a/Makefile b/Makefile index 58dd2fb..45fa799 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ #!/bin/make -f -DO := ./build/utils.sh -SET_CONFIG := $(DO) set-config -DESTDIR ?= / -MAYBE_SUDO := '' +DO := ./build/utils.sh +SET_CONFIG := $(DO) set-config +DESTDIR ?= / +MAYBE_SUDO_DO := $(DO) define colorecho @tput setaf 118 || true @@ -18,7 +18,7 @@ stays_on_top := False endif ifeq ($(DESTDIR),/) -MAYBE_SUDO := sudo +MAYBE_SUDO_DO := sudo $(DO) endif @@ -58,13 +58,14 @@ build: _build_init _apply_config $(DO) build build_dev: install - sudo $(DO) install-dev + $(MAYBE_SUDO_DO) install-dev clean: $(DO) clean install: build - $(MAYBE_SUDO) $(DO) install $(DESTDIR) + ./build/utils.sh prepare-install + $(MAYBE_SUDO_DO) install $(DESTDIR) $(call colorecho, SUCCESS!) diff --git a/build/utils.sh b/build/utils.sh index 3420e73..eb66b07 100755 --- a/build/utils.sh +++ b/build/utils.sh @@ -10,8 +10,8 @@ DESTDIR='' _handle_error() { LASTLINE="$1" LASTERR="$2" - echo "${BASH_SOURCE[0]}: line ${LASTLINE}: exit status of last command: ${LASTERR}" - exit 1 + (>&2 echo "${BASH_SOURCE[0]}: line ${LASTLINE}: exit status of last command: ${LASTERR}") + exit "${LASTERR}" } clean_build_dir() { @@ -45,34 +45,8 @@ do_build() { } do_install() { - cd "${BUILD_DIR}" - mkdir -p \ - "${INSTALL_ROOT}"/usr/share/{man/man1,metainfo,web-greeter,xgreeters} \ - "${INSTALL_ROOT}/etc/lightdm" - - # Themes - (cp -R "${REPO_DIR}/themes" "${INSTALL_ROOT}/usr/share/web-greeter" \ - && cd "${INSTALL_ROOT}/usr/share/web-greeter" \ - && mv themes/_vendor .) - - # Man Page - cp "${BUILD_DIR}/dist/${PKGNAME}.1" "${INSTALL_ROOT}/usr/share/man/man1" - - # Greeter Config - cp "${BUILD_DIR}/dist/${PKGNAME}.yml" "${INSTALL_ROOT}/etc/lightdm" - - # AppData File - cp "${BUILD_DIR}/dist/com.antergos.${PKGNAME}.appdata.xml" "${INSTALL_ROOT}/usr/share/metainfo" - - # Desktop File - cp "${BUILD_DIR}/dist/com.antergos.${PKGNAME}.desktop" "${INSTALL_ROOT}/usr/share/xgreeters" - - # Do Install! [[ -e "${DESTDIR}" ]] || mkdir -p "${DESTDIR}" cp -R "${INSTALL_ROOT}"/* "${DESTDIR}" - - # Fix Permissions - [[ -n "${SUDO_UID}" ]] && chown -R "${SUDO_UID}:${SUDO_GID}" "${BUILD_DIR}" } do_install_dev() { @@ -97,6 +71,30 @@ init_build_dir() { cp -R -t "${BUILD_DIR}" "${REPO_DIR}/web-greeter" "${REPO_DIR}/dist" } +prepare_install() { + cd "${BUILD_DIR}" + mkdir -p \ + "${INSTALL_ROOT}"/usr/share/{man/man1,metainfo,web-greeter,xgreeters} \ + "${INSTALL_ROOT}/etc/lightdm" + + # Themes + (cp -R "${REPO_DIR}/themes" "${INSTALL_ROOT}/usr/share/web-greeter" \ + && cd "${INSTALL_ROOT}/usr/share/web-greeter" \ + && mv themes/_vendor .) + + # Man Page + cp "${BUILD_DIR}/dist/${PKGNAME}.1" "${INSTALL_ROOT}/usr/share/man/man1" + + # Greeter Config + cp "${BUILD_DIR}/dist/${PKGNAME}.yml" "${INSTALL_ROOT}/etc/lightdm" + + # AppData File + cp "${BUILD_DIR}/dist/com.antergos.${PKGNAME}.appdata.xml" "${INSTALL_ROOT}/usr/share/metainfo" + + # Desktop File + cp "${BUILD_DIR}/dist/com.antergos.${PKGNAME}.desktop" "${INSTALL_ROOT}/usr/share/xgreeters" +} + set_config() { [[ -z "$1" || -z "$2" ]] && return 1 @@ -142,6 +140,10 @@ case "$1" in do_install_dev ;; + prepare-install) + prepare_install + ;; + set-config) set_config "$2" "$3" ;; diff --git a/dist/com.antergos.web-greeter.appdata.xml b/dist/com.antergos.web-greeter.appdata.xml index d44f388..8a291bc 100644 --- a/dist/com.antergos.web-greeter.appdata.xml +++ b/dist/com.antergos.web-greeter.appdata.xml @@ -11,8 +11,8 @@ Web Greeter for LightDM utilizes themes built with HTML/CSS/JavaScript for it's login screen.
- Web Greeter's themes provide modern, visually appealing, and feature-rich - login screens. It includes two themes by default. There are a growing number of + Web Greeter themes provide modern, visually appealing, and feature-rich + login screens. Two themes are included by default. There are a growing number of 3rd-Party themes available online.
@@ -97,6 +97,9 @@