diff --git a/brick.sh b/brick.sh index c5010b8..853a759 100755 --- a/brick.sh +++ b/brick.sh @@ -66,25 +66,7 @@ PKGS=() ERRORED=false AUTOMATIC=false -# settings the PKGS var -# lets grab those from argv -while [[ $# -gt 0 ]]; do - case $1 in - -y|--noconfirm) - AUTOMATIC=true - shift;; - -*) - # meh domt need unkonw args - shift;; - *) - # everything else is a package name however - PKGS+=("$1") - shift;; - esac -done - # setting the BRICKS_DIR var - BRICKS_PWD=$(pwd) while :; do @@ -99,11 +81,35 @@ while :; do exit 1 fi done - unset BRICKS_PWD + BRICKS_DB=$(brickdb) BRICKS_INSTALLED=$(cat $BRICKS_DB/installed) +# settings the PKGS var +# lets grab those from argv +while [[ $# -gt 0 ]]; do + case $1 in + -y|--noconfirm) + AUTOMATIC=true + shift;; + -L) + inf "listing packages" + for pkg in $(find $BRICKS_DIR -maxdepth 1 -type f -printf "%f\n" | grep -E \\.brick$ | sed 's/.brick//'); do + source $(getbrick $pkg) + inf "$(inf "$pkg - $(info)")" + done + exit 0 + ;; + -*) + # meh domt need unkonw args + shift;; + *) + # everything else is a package name however + PKGS+=("$1") + shift;; + esac +done PPKGS=() diff --git a/bricks/nvim.brick b/bricks/nvim.brick index 89d3c3c..bd165ed 100644 --- a/bricks/nvim.brick +++ b/bricks/nvim.brick @@ -4,6 +4,10 @@ # which also installs nvim # this brick is GPL3 only +info() { + echo a fun vim-like editor +} + pkgs() { echo neovim } diff --git a/bricks/omz.brick b/bricks/omz.brick index f266712..d360034 100644 --- a/bricks/omz.brick +++ b/bricks/omz.brick @@ -2,6 +2,10 @@ # omz brick (pacakge is GPL3 only, omz itself is MIT (as of jan 2024)) # made by alice +info() { + echo a nice shell framework +} + pkgs() { echo sh curl git zsh }