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