refactor(rmv): clean dir

This commit is contained in:
Eshan Roy (Eshanized)
2024-05-12 17:23:04 +00:00
parent 0e80f5f673
commit 5bcde31f3b
32999 changed files with 0 additions and 3101016 deletions

View File

@@ -1,38 +0,0 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
pkgname=snigdhaos-system-config
org=Snigdha-OS
_pkgname=snigdhaos-system-config
_destname1="/etc"
_destname2="/usr"
_licensedir="/usr/share/snigdhaos/licenses/"
pkgver=1
pkgrel=1
pkgdesc="Snigdha OS System Config!"
arch=('any')
url="https://github.com/$org/$_pkgname"
license=('MIT')
makedepends=('git')
depends=()
conflicts=('snigdhaos-system-config-next')
backup=('etc/pacman.d/gnupg/gpg.conf' 'etc/X11/xorg.conf.d/30-touchpad.conf')
provides=("${pkgname}")
options=( !strip !emptydirs )
source=(${pkgname}::"git+https://github.com/${org}/${_pkgname}")
sha256sums=('SKIP')
install=$pkgname.install
pkgver(){
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
install -dm755 "$pkgdir/$_licensedir/$_pkgname"
install -m644 "$srcdir/$pkgname/LICENSE" "$pkgdir/$_licensedir/$_pkgname"
install -dm755 "$pkgdir/$_destname1"
cp -r ${srcdir}/${pkgname}/${_destname1} ${pkgdir}
install -dm755 "$pkgdir$_destname2"
cp -r ${srcdir}/${pkgname}/${_destname2} ${pkgdir}
}

View File

@@ -1,161 +0,0 @@
post_install(){
tput setaf 3;
echo
echo "[WARNING] WARNING!"
echo
echo "If you are on Grub, please install the following package..."
echo "sudo pacman -S snigdhaos-bootloader-grub"
echo
echo "If you are using systemd-boot then isntall the following package..."
echo "sudo pacman -S snigdhaos-bootloader-systemd"
echo
echo "[WARNING] WARNING!"
echo
tput setaf 2;
bootloader=$(bootctl status | grep "Product" | awk '{print $2}')
if [ "$bootloader" = "systemd-boot" ]; then
echo
echo "systemd-bootloader found!"
echo "Install the following package for your safety!"
echo
echo "sudo pacman -S snigdhaos-bootloader-systemd"
echo "It has all the pacman-hooks which are essentials."
echo
elif [ $bootloader = "GRUB" ]; then
echo
echo "GRUB bootloader found!"
echo "Install the following package for your safety!"
echo
echo "sudo pacman -S snigdhaos-bootloader-grub"
echo "It has all the pacman-hooks which are essentials."
echo
fi
tput sgr0
# Confirmation for package installation
package_installed(){
if pacman -Qi "$1" &> /dev/null; then
return 0
else
return 1
fi
}
tput setaf 6;
if package_installed snigdhaos-bootloader-grub; then
echo
echo "snigdhaos-bootloader-grub found!"
echo "Bootloader is safe!"
echo
fi
tput sgr0
tput setaf 6;
if package_installed snigdhaos-bootloader-systemd; then
echo
echo "snigdhaos-bootloader-systemd found!"
echo "Bootloader is safe!"
echo
fi
tput sgr0
tput setaf 1;
if ! package_installed snigdhaos-bootloader-systemd && ! package_installed snigdhaos-bootloader-grub; then
echo
echo "snigdhaos-bootloader-systemd or snigdhaos-bootloader-grub not found!"
echo "[WARNING] WARNING!"
echo "Install the package for systemd or grub!"
echo
fi
tput sgr0
if systemctl --all --type service | grep -q "virtual-machine-check"; then
systemctl disable virtual-machine-check.service
fi
sh /usr/local/bin/snigdhaos-lsb-release
sh /usr/local/bin/snigdhaos-os-release
}
post_upgrade(){
tput setaf 3;
echo
echo "[WARNING] WARNING!"
echo
echo "If you are on Grub, please install the following package..."
echo "sudo pacman -S snigdhaos-bootloader-grub"
echo
echo "If you are using systemd-boot then isntall the following package..."
echo "sudo pacman -S snigdhaos-bootloader-systemd"
echo
echo "[WARNING] WARNING!"
echo
tput setaf 2;
bootloader=$(bootctl status | grep "Product" | awk '{print $2}')
if [ "$bootloader" = "systemd-boot" ]; then
echo
echo "systemd-bootloader found!"
echo "Install the following package for your safety!"
echo
echo "sudo pacman -S snigdhaos-bootloader-systemd"
echo "It has all the pacman-hooks which are essentials."
echo
elif [ $bootloader = "GRUB" ]; then
echo
echo "GRUB bootloader found!"
echo "Install the following package for your safety!"
echo
echo "sudo pacman -S snigdhaos-bootloader-grub"
echo "It has all the pacman-hooks which are essentials."
echo
fi
tput sgr0
# Confirmation for package installation
package_installed(){
if pacman -Qi "$1" &> /dev/null; then
return 0
else
return 1
fi
}
tput setaf 6;
if package_installed snigdhaos-bootloader-grub; then
echo
echo "snigdhaos-bootloader-grub found!"
echo "Bootloader is safe!"
echo
fi
tput sgr0
tput setaf 6;
if package_installed snigdhaos-bootloader-systemd; then
echo
echo "snigdhaos-bootloader-systemd found!"
echo "Bootloader is safe!"
echo
fi
tput sgr0
tput setaf 1;
if ! package_installed snigdhaos-bootloader-systemd && ! package_installed snigdhaos-bootloader-grub; then
echo
echo "snigdhaos-bootloader-systemd or snigdhaos-bootloader-grub not found!"
echo "[WARNING] WARNING!"
echo "Install the package for systemd or grub!"
echo
fi
tput sgr0
if systemctl --all --type service | grep -q "virtual-machine-check"; then
systemctl disable virtual-machine-check.service
fi
sh /usr/local/bin/snigdhaos-lsb-release
sh /usr/local/bin/snigdhaos-os-release
}
pre_remove(){
if systemctl --all --type service | grep -q "virtual-machine-check"; then
systemctl disable virtual-machine-check.service
fi
}