fixed?
This commit is contained in:
parent
b558438cef
commit
ec0131ecfb
1 changed files with 2 additions and 21 deletions
23
makedir.sh
23
makedir.sh
|
@ -1,24 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ─< Helper functions >─────────────────────────────────────────────────────────────────
|
||||
function echo_error() { echo -e "\033[0;1;31mError: \033[0;31m\t${*}\033[0m"; }
|
||||
function echo_binfo() { echo -e "\033[0;1;34mINFO: \033[0;34m\t${*}\033[0m"; }
|
||||
function echo_info() { echo -e "\033[0;1;35mInfo: \033[0;35m${*}\033[0m"; }
|
||||
|
||||
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
||||
command_exists() {
|
||||
command -v "$@" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# ─< to get the alias to install everything either with your shell or inside your script! >─
|
||||
if command_exists curl; then
|
||||
install_pkg() {
|
||||
bash --norc -c "$(curl -sSL https://git.k4li.de/pika/scripts/raw/branch/main/bash/snippets/install_pkg.sh)" "$@"
|
||||
}
|
||||
else
|
||||
echo_error "curl is not installed, universal install disabled!"
|
||||
fi
|
||||
|
||||
# ─< Silent execution >─────────────────────────────────────────────────────────────────
|
||||
silentexec() {
|
||||
"$@" >/dev/null 2>&1
|
||||
|
@ -26,8 +7,8 @@ silentexec() {
|
|||
|
||||
mkdirs() {
|
||||
# ─< .config dir >────────────────────────────────────────────────────────────────────────
|
||||
if [[ ! -f $HOME/.config/ ]]; then
|
||||
echo_binfo "mkdir $HOME/.config"
|
||||
if [[ ! -d $HOME/.config ]]; then
|
||||
echo "mkdir $HOME/.config"
|
||||
silentexec mkdir $HOME/.config
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue