Adds bootstrap.v2
This commit is contained in:
parent
06c8003cf2
commit
2bbccb4595
61 changed files with 468 additions and 4 deletions
29
.config/yadm/bootstrap.v2/functions/pkg.sh
Normal file
29
.config/yadm/bootstrap.v2/functions/pkg.sh
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/env sh
|
||||
|
||||
installPackages() {
|
||||
packages=$@
|
||||
|
||||
if command -v yay >/dev/null; then
|
||||
echo " using yay"
|
||||
yay -S --needed $packages
|
||||
elif command -v apt >/dev/null; then
|
||||
echo " using apt"
|
||||
apt install $packages
|
||||
else
|
||||
echo "... no supported package manager found. exiting"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
updateSystem() {
|
||||
if command -v yay >/dev/null; then
|
||||
echo " using yay"
|
||||
yay
|
||||
elif command -v apt >/dev/null; then
|
||||
echo " using apt"
|
||||
apt update
|
||||
else
|
||||
echo "... no supported package manager found. exiting"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue