#!/bin/sh # Binary for syncing xbps with a list # # HOWTO: # Make sure to install xtools and that there is a # repository.list, which should be initialized with xpkg -m > ~/repository.list # # Add whatever package you want to install, and run xsync to sync your # list of packages with the new list set -e xpkg -m | sort > /tmp/xsync-installed cat ~/repository.list | sort > /tmp/xsync-spec echo $INSTALLED comm /tmp/xsync-spec /tmp/xsync-installed -23 > /tmp/xsync-to-install comm /tmp/xsync-spec /tmp/xsync-installed -13 > /tmp/xsync-to-remove [ -s /tmp/xsync-to-remove ] && sudo xbps-remove $(cat /tmp/xsync-to-remove) || echo "Nothing to remove" [ -s /tmp/xsync-to-install ] && sudo xbps-install $(cat /tmp/xsync-to-install) || echo "Nothing to install"