mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Allow changing Omarchy branches from the menu
This commit is contained in:
20
bin/omarchy-update-branch
Executable file
20
bin/omarchy-update-branch
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if (($# == 0)); then
|
||||
echo "Usage: omarchy-verion-branch-set [master|dev]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
new_branch="$1"
|
||||
|
||||
# Snapshot before switching branch
|
||||
omarchy-snapshot create || [ $? -eq 127 ]
|
||||
|
||||
# Checkout the new branch
|
||||
git -C $OMARCHY_PATH checkout $new_branch --autostash
|
||||
git -C $OMARCHY_PATH diff --check || git -C $OMARCHY_PATH reset --merge
|
||||
|
||||
# Update the system from the new branch
|
||||
omarchy-update-perform
|
||||
Reference in New Issue
Block a user