Addet a dream.sh import script (about 1k lines..)
This commit is contained in:
parent
2b543575c4
commit
73049cbde6
1 changed files with 1 additions and 10 deletions
11
dream.sh
11
dream.sh
|
@ -160,7 +160,6 @@ check-and-install() {
|
||||||
check_env() {
|
check_env() {
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
if command_exists sudo; then
|
if command_exists sudo; then
|
||||||
# echo_info "User is not root. Using sudo for privileged operations."
|
|
||||||
_sudo="sudo -E"
|
_sudo="sudo -E"
|
||||||
else
|
else
|
||||||
echo-error "No sudo found and you're not root! Can't install packages."
|
echo-error "No sudo found and you're not root! Can't install packages."
|
||||||
|
@ -223,7 +222,6 @@ _setup() {
|
||||||
$_sudo nala autopurge --assume-yes
|
$_sudo nala autopurge --assume-yes
|
||||||
else
|
else
|
||||||
pkger=apt-get
|
pkger=apt-get
|
||||||
# echo_pkg "Using pacman"
|
|
||||||
$_sudo apt-get remove --assume-yes "$@"
|
$_sudo apt-get remove --assume-yes "$@"
|
||||||
$_sudo apt-get autoremove --assume-yes
|
$_sudo apt-get autoremove --assume-yes
|
||||||
fi
|
fi
|
||||||
|
@ -253,15 +251,12 @@ _setup() {
|
||||||
pkg-install() {
|
pkg-install() {
|
||||||
if command_exists paru; then
|
if command_exists paru; then
|
||||||
pkger=paru
|
pkger=paru
|
||||||
# echo_pkg "Using paru"
|
|
||||||
paru -S --color always --noconfirm --needed "$@"
|
paru -S --color always --noconfirm --needed "$@"
|
||||||
elif command_exists yay; then
|
elif command_exists yay; then
|
||||||
pkger=yay
|
pkger=yay
|
||||||
# echo_pkg "Using yay"
|
|
||||||
yay -S --color always --noconfirm --needed "$@"
|
yay -S --color always --noconfirm --needed "$@"
|
||||||
else
|
else
|
||||||
pkger=pacman
|
pkger=pacman
|
||||||
# echo_pkg "Using pacman"
|
|
||||||
$_sudo pacman -S --color always --noconfirm --needed "$@"
|
$_sudo pacman -S --color always --noconfirm --needed "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -270,15 +265,12 @@ _setup() {
|
||||||
pkg-remove() {
|
pkg-remove() {
|
||||||
if command_exists paru; then
|
if command_exists paru; then
|
||||||
pkger=paru
|
pkger=paru
|
||||||
# echo_info "Using paru"
|
|
||||||
paru -R --color always --noconfirm "$@"
|
paru -R --color always --noconfirm "$@"
|
||||||
elif command_exists yay; then
|
elif command_exists yay; then
|
||||||
pkger=yay
|
pkger=yay
|
||||||
# echo_info "Using yay"
|
|
||||||
yay -R --color always --noconfirm "$@"
|
yay -R --color always --noconfirm "$@"
|
||||||
else
|
else
|
||||||
pkger=pacman
|
pkger=pacman
|
||||||
# echo_warning "Using pacman"
|
|
||||||
$_sudo pacman -R --color always --noconfirm "$@"
|
$_sudo pacman -R --color always --noconfirm "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -350,14 +342,13 @@ get_packager() {
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
pen red bold "Can not detect distribution correctly!"
|
pen red bold "Can not detect distribution correctly!"
|
||||||
# echo_error "DEBUG:: $pkger ::"
|
|
||||||
return 69
|
return 69
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -e /etc/os-release ]; then
|
if [ -e /etc/os-release ]; then
|
||||||
echo_info "Detecting distribution..."
|
pen bold grey "Detecting distribution..."
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
|
|
||||||
# ─< Convert $ID and $ID_LIKE to lowercase >──────────────────────────────────────────────
|
# ─< Convert $ID and $ID_LIKE to lowercase >──────────────────────────────────────────────
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue