summaryrefslogtreecommitdiff
path: root/hooks/pre-up/void
blob: 7492f9f56c7d67f7d0c43ed03c700a592fa163b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# We'll use xpkg from xtools to find installable packages
if ! [ -x "$(command -v xpkg)" ]; then
  sudo xbps-install xtools
fi

# Set up file sync
if [ ! -f ~/repository.list ]; then
  xpkg -m > ~/repository.list
fi

NONFREE_REPO=$(cat ~/repository.list | grep "void-repo-nonfree")

if [ ! -n "$NONFREE_REPO" ]; then
  sudo xbps-install -Sy void-repo-nonfree
fi