#!/bin/bash
# create a dated archive of the pacman cache
chkroot && [[ $? = 0 ]] || exit 1
cd /var/cache/
tar pczf /home/jason/pacmancache-`date +%F`.tar.gz pacman/pkg
[[ $? = 0 ]] || echo "archive failed"; exit 1
echo "clearing old cache..."
pacman -S --clean
exit 0
# create a dated archive of the pacman cache
chkroot && [[ $? = 0 ]] || exit 1
cd /var/cache/
tar pczf /home/jason/pacmancache-`date +%F`.tar.gz pacman/pkg
[[ $? = 0 ]] || echo "archive failed"; exit 1
echo "clearing old cache..."
pacman -S --clean
exit 0
No comments:
Post a Comment