From e97067be1035ebda9cadd021769ac65c67f29110 Mon Sep 17 00:00:00 2001 From: Raine Date: Sat, 14 Oct 2023 22:38:04 +0200 Subject: [PATCH] compatibility --- command.list | 4 ++-- comp.sh | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100755 comp.sh diff --git a/command.list b/command.list index 308817f..4437ba9 100644 --- a/command.list +++ b/command.list @@ -1,5 +1,5 @@ -^. ./sync.conf && $PM_COMMAND $PM_UPGRADE +^. ./sync.conf && $PM_COMMAND $PM_UPGRADE $PM_NOCONFIRM ^[ -d /tmp/yay ] && rm -rf /tmp/yay git clone https://aur.archlinux.org/yay /tmp/yay cd /tmp/yay && makepkg --noconfirm -si && echo $PREF_TERM -sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended +sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended || echo "zsh not installed" diff --git a/comp.sh b/comp.sh new file mode 100755 index 0000000..4091ead --- /dev/null +++ b/comp.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +# #################### # +# Compatibility Script # +# #################### # +if [ ! -z "$1" ]; then + cmd=$1; shift +fi + +case $cmd in + debian|ubuntu|apt|deb) + PM_COMMAND=apt \ + PM_NOCONFIRM=-y \ + PM_INSTALL=install \ + PM_UPDATE=update \ + PM_UPGRADE=upgrade \ + PM_REMOVE=purge \ + ./sync.sh "$@" + ;; + *|''|arch) ./sync.sh ;; +esac \ No newline at end of file