restructed update script for staging-data-hoarder
This commit is contained in:
parent
1df5b086cf
commit
667a7bb974
|
@ -11,27 +11,41 @@ let
|
|||
|
||||
NAME=$1
|
||||
if [ $NAME = "staging-data-hoarder" ]; then
|
||||
SRC=https://github.com/dump-dvb/nix-config.git
|
||||
SRC_NIX_CONFIG=https://github.com/dump-dvb/nix-config.git
|
||||
SRC_DUMP_DVB=https://github.com/dump-dvb/dump-dvb.nix.git
|
||||
BRANCH=master
|
||||
DIR=dvb-dump
|
||||
|
||||
DIR_NIX_CONFIG=dvb-dump
|
||||
DIR_DUMP_DVB=dvb-dump
|
||||
else
|
||||
echo "Do not know what to do"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd /tmp
|
||||
if [ -d $DIR ]; then
|
||||
cd $DIR
|
||||
if [ -d $DIR_DUMP_DVB ]; then
|
||||
cd $DIR_DUMP_DVB
|
||||
git fetch origin
|
||||
git reset --hard origin/$BRANCH
|
||||
else
|
||||
git clone -b $BRANCH --single-branch $SRC $DIR
|
||||
cd $DIR
|
||||
git clone -b $BRANCH --single-branch $SRC $DIR_DUMP_DVB
|
||||
cd $DIR_DUMP_DVB
|
||||
fi
|
||||
nix flake update
|
||||
|
||||
cd /tmp
|
||||
if [ -d $DIR_NIX_CONFIG ]; then
|
||||
cd $DIR_NIX_CONFIG
|
||||
git fetch origin
|
||||
git reset --hard origin/$BRANCH
|
||||
else
|
||||
git clone -b $BRANCH --single-branch $SRC $DIR_NIX_CONFIG
|
||||
cd $DIR_NIX_CONFIG
|
||||
fi
|
||||
|
||||
git config --global user.email "astro@spaceboyz.net"
|
||||
git config --global user.name "Updater"
|
||||
nix flake update --commit-lock-file
|
||||
nix flake update --commit-lock-file --override-input dump-dvb ../$DIR_DUMP_DVB
|
||||
''}/bin/realize-flake";
|
||||
in
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue