This repository has been archived on 2024-03-04. You can view files and clone it, but cannot push or open issues or pull requests.
linux/.Bootstrap.sh

19 lines
508 B
Bash
Raw Permalink Normal View History

2024-02-20 15:01:32 +03:00
#!/usr/bin/env bash
2023-10-31 21:36:17 +03:00
2024-02-20 15:01:32 +03:00
# Check if this is already a git repo.
2023-10-31 21:36:17 +03:00
if [[ -d ".git" ]]; then
2023-12-05 22:16:14 +03:00
echo "Found the .git directory. Already initialized?"
exit 1
2023-10-31 21:36:17 +03:00
fi
2024-02-20 15:01:32 +03:00
# Sync.
2023-10-31 21:48:37 +03:00
git init &> /dev/null
git remote add origin https://git.voronind.com/voronind/linux.git &> /dev/null
git fetch &> /dev/null
2024-01-02 17:06:54 +03:00
git reset origin/main &> /dev/null
# git checkout -t origin/main
2023-10-31 21:48:37 +03:00
git reset --hard HEAD &> /dev/null
2024-02-13 23:59:39 +03:00
git checkout main &> /dev/null
2024-01-02 17:06:54 +03:00
git branch --set-upstream-to=origin/main main &> /dev/null
2024-02-13 23:59:39 +03:00
git branch -D master &> /dev/null