summaryrefslogtreecommitdiff
path: root/installer/guix-log
diff options
context:
space:
mode:
Diffstat (limited to 'installer/guix-log')
-rwxr-xr-xinstaller/guix-log23
1 files changed, 23 insertions, 0 deletions
diff --git a/installer/guix-log b/installer/guix-log
new file mode 100755
index 0000000..0d26853
--- /dev/null
+++ b/installer/guix-log
@@ -0,0 +1,23 @@
+#!/run/current-system/profile/bin/bash
+
+ERROR() {
+ >&2 printf "\x1b[91mError: \x1b[0m\x1b[98m$1\n"
+}
+
+EVENT() {
+ printf "\x1b[95m>>> \x1b[0m\x1b[98m$1\n"
+}
+
+CONFIRM=""
+
+confirm() {
+ if [ "$CONFIRM" == "y" ]; then
+ exit 0
+ fi
+ read -p "Are you sure: ($1)? [y/N] " CONFIRM
+ if [ "$CONFIRM" == "y" ]; then
+ exit 0
+ else
+ exit 1
+ fi
+}