mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-01-22 04:08:36 +01:00
Fix broken backup section in script
This commit is contained in:
parent
2082b9f807
commit
76bc11360d
@ -19,7 +19,7 @@ fi
|
||||
echo "-----"
|
||||
|
||||
echo "Ensure In Home Directory"
|
||||
cd || exit
|
||||
cd
|
||||
|
||||
echo "-----"
|
||||
|
||||
@ -30,15 +30,6 @@ fi
|
||||
|
||||
echo "-----"
|
||||
|
||||
echo "Cloning & Entering ZaneyOS Repository"
|
||||
git clone https://gitlab.com/zaney/zaneyos.git
|
||||
cd zaneyos || exit
|
||||
cp -r hosts/default hosts/$hostName
|
||||
sed -i "/^\s*host[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$hostName\"/" ./flake.nix
|
||||
sed -i "/^\s*setHostname[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$hostName\"/" ./hosts/$hostName/options.nix
|
||||
|
||||
echo "-----"
|
||||
|
||||
backupname=$(date "+%Y-%m-%d-%H-%M-%S")
|
||||
if [ -d "zaneyos" ]; then
|
||||
echo "ZaneyOS exists, backing up to .config/zaneyos-backups folder."
|
||||
@ -59,6 +50,16 @@ fi
|
||||
|
||||
echo "-----"
|
||||
|
||||
echo "Cloning & Entering ZaneyOS Repository"
|
||||
git clone https://gitlab.com/zaney/zaneyos.git
|
||||
cd zaneyos
|
||||
mkdir hosts/$hostName
|
||||
cp hosts/default/*.nix hosts/$hostName
|
||||
sed -i "/^\s*host[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$hostName\"/" ./flake.nix
|
||||
sed -i "/^\s*setHostname[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$hostName\"/" ./hosts/$hostName/options.nix
|
||||
|
||||
echo "-----"
|
||||
|
||||
echo "Default options are in brackets []"
|
||||
echo "Just press enter to select the default"
|
||||
sleep 2
|
||||
@ -87,9 +88,6 @@ else
|
||||
fi
|
||||
sed -i "/^\s*setUsername[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$userName\"/" ./hosts/$hostName/options.nix
|
||||
|
||||
echo "-----"
|
||||
|
||||
|
||||
echo "-----"
|
||||
|
||||
read -p "Enter Your New Git Username: [ John Smith ] " gitUserName
|
||||
|
Loading…
Reference in New Issue
Block a user