From 99818aaad3fbd688160919c7cfa5155fbcba8f60 Mon Sep 17 00:00:00 2001 From: Suleyman Farajli Date: Mon, 30 Sep 2024 00:31:04 +0400 Subject: Makefile: config rule updated to install sites directory --- Makefile | 2 +- scripts/br | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 scripts/br diff --git a/Makefile b/Makefile index 4eb84a8..d816822 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ config: $(COPY) config/x11 $(CONFDIR) $(COPY) config/zathura $(CONFDIR) $(COPY) config/mimeapps.list $(CONFDIR) - + $(COPY) config/sites/bookmarks.txt $(CONFDIR) $(LINK) $(CONFDIR)/shell/profile $(BASHPROFILE) $(LINK) $(CONFDIR)/shell/profile $(ZPROFILE) diff --git a/scripts/br b/scripts/br new file mode 100644 index 0000000..e264361 --- /dev/null +++ b/scripts/br @@ -0,0 +1,34 @@ +#!/bin/sh + +help() { +cat << EOF +${0}: Open given in the browser. +options: + -l [link] Open link + -h Print this message and exit +EOF +} + +err() { + for line in "${@}"; do + echo "${line}" >&2 + done + exit 1 +} + +if ! command -v dmenu > /dev/null 2>&1; then + err "${0}: dmenu must be installed" +fi + +if [ "${#}" -eq 0 ]; then + + +elif [ "${#}" -eq 1 ]; then + [ "${1}" == "-h" ] && help + [ "${1}" == "-l" ] + +else + err "invalid usage" +fi + + -- cgit v1.2.3