mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-03 20:21:47 +02:00
scripts/repo_reset.sh: stub to hard reset stupid git repo when stupid portage fails to sync right
This commit is contained in:
parent
4991a67d26
commit
0c23ad2f0d
1 changed files with 13 additions and 0 deletions
13
scripts/repo_reset.sh
Executable file
13
scripts/repo_reset.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
pentoo_repo=$(portageq get_repo_path / pentoo)
|
||||
#this is a safety check to make sure we aren't force resetting a dev's environment
|
||||
if ! grep 'git@github.com:pentoo/pentoo-overlay.git' "${pentoo_repo}/.git/config"; then
|
||||
if cd "${pentoo_repo}"; then
|
||||
#should probably add some "is this needed?" detection in here
|
||||
git reset --hard origin
|
||||
git clean -fd
|
||||
git clean -fx
|
||||
fi
|
||||
else
|
||||
printf "Not hard resetting git on developer machine\n"
|
||||
fi
|
||||
Loading…
Reference in a new issue