diff options
| author | stkhan <personal@slickd.xyz> | 2024-01-01 00:51:36 +0000 |
|---|---|---|
| committer | stkhan <personal@slickd.xyz> | 2024-01-01 00:51:36 +0000 |
| commit | 9b160a482ac271fb5678e15007752f5711731050 (patch) | |
| tree | 643212d164e1ae32ed92dc77836f907775a0f2e4 /depm | |
init commit
Diffstat (limited to 'depm')
| -rwxr-xr-x | depm | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -0,0 +1,28 @@ +#!/bin/sh + +os=$(cat /etc/os-release | grep ID | head -n 1) +DEPMFILE=Depmfile + +if [[ ! -f Depmfile ]]; then + echo "This repository does not have a Depmfile." + exit +fi + +install_arch() { + ARCH_PACKAGES=$(grep ARCH_PACKAGES ${DEPMFILE} | sed 's/ARCH_PACKAGES: //g') + if [[ $ARCH_PACKAGES == "" ]]; then + echo "Repository does not have any dependencies for Arch Linux" + else + pacman -S --needed $ARCH_PACKAGES + fi +} + + +case $os in + "ID=arch") install_arch;; + "ID=artix") + echo "WARNING: You may need standard Arch Linux repositories enabled in pacman." + install_arch;; + + *) echo "Unknown OS\n You must manually install dependencies";; +esac |