Automatically clone 'nixpkgs'

nixpkgs cache is stored in $HOME/.cache/nixpkgs. Will setup upstream and origin correctly to be used later on with 'hub'.
This commit is contained in:
Matthew Justin Bauer 2018-03-17 12:18:32 -05:00 committed by GitHub
parent af7153d3b8
commit fc02d11a8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

13
ups.sh
View File

@ -9,6 +9,19 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ARGUMENTS=""
NIXPKGS=$HOME/.cache/nixpkgs
if ! [ -d "$NIXPKGS" ]
then
hub clone nixpkgs $NIXPKGS # requires that user has forked nixpkgs
cd $NIXPKGS
git remote add upstream https://github.com/NixOS/nixpkgs
git fetch upstream
git fetch origin staging
git fetch upstream staging
fi
cd $NIXPKGS
export DRY_RUN=true
echo "