Skip to content
Permalink
Browse files

update developer conversion script

  • Loading branch information...
TotallyNotElite committed Oct 19, 2019
1 parent 26d9f6d commit bb3ba927d921db3fb8c2381d212945829ee387fd
Showing with 33 additions and 12 deletions.
  1. +1 −1 config
  2. +32 −11 scripts/developer
2 config
@@ -35,7 +35,7 @@ do
elif [ "$response" == 2 ]; then
cfg_write $configfile update_channel master
elif [ "$response" == 3 ]; then
cfg_write $configfile update_channel developer
./scripts/developer
else
continue
fi
@@ -4,17 +4,38 @@ if [ $EUID == 0 ]; then
exit
fi

if [ ! -f ./scripts/updater-preferences ]; then
while true; do
read -p "Do you want to switch your cathook repository into developer mode? y/n " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
fi
while true; do
read -p "Do you want to switch your cathook repository into developer mode? y/n " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done

# git setup
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch --unshallow
git fetch --all
git submodule foreach --recursive 'git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"'
git submodule foreach --recursive 'git fetch --unshallow'

# config setup
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
configfile="$DIR/updater-preferences"
. config.shlib
cfg_write $configfile update_channel developer

while true; do
read -p "Would you like to reset your repository to the origin/master branch? y/n " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done

# more git setup
git reset --hard origin/master
git submodule foreach --recursive 'git reset --hard'
git submodule sync
git submodule update --init --recursive

0 comments on commit bb3ba92

Please sign in to comment.
You can’t perform that action at this time.