diff --git a/admin/client_edit.bash b/admin/client_edit.bash new file mode 100644 index 0000000..b54836d --- /dev/null +++ b/admin/client_edit.bash @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +cd "$TREEHOUSE_PATH" + +echo +echo "* Running editor" +"$EDITOR" content/index.tree + +bash admin/client_push.bash diff --git a/admin/client_edit.fish b/admin/client_edit.fish deleted file mode 100644 index cea5e8d..0000000 --- a/admin/client_edit.fish +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env fish - -cd $TREEHOUSE_PATH - -echo -set_color white --bold; echo "* Running editor"; set_color normal -eval $EDITOR content/index.tree - -fish admin/client_push.fish diff --git a/admin/client_push.bash b/admin/client_push.bash new file mode 100644 index 0000000..3a84f60 --- /dev/null +++ b/admin/client_push.bash @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +cd "$TREEHOUSE_PATH" + +echo +echo "* Fixing the tree" +cargo run -p treehouse fix-all --apply + +echo +echo "* Committing changes" +git add \ + content static template \ + treehouse.toml +git commit +git push + +echo +echo "* Uploading to server" +bash admin/client_sync.bash diff --git a/admin/client_push.fish b/admin/client_push.fish deleted file mode 100644 index 28e69e8..0000000 --- a/admin/client_push.fish +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env fish - -cd $TREEHOUSE_PATH - -echo -set_color white --bold; echo "* Fixing the tree"; set_color normal -cargo run -p treehouse fix-all --apply - -echo -set_color white --bold; echo "* Committing changes"; set_color normal -git add \ - content static template \ - treehouse.toml -git commit -git push - -echo -set_color white --bold; echo "* Uploading to server"; set_color normal -fish admin/client_sync.fish diff --git a/admin/client_sync.bash b/admin/client_sync.bash new file mode 100644 index 0000000..c7abb93 --- /dev/null +++ b/admin/client_sync.bash @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +ssh "$TREEHOUSE_SERVER" -p "$TREEHOUSE_SERVER_PORT" 'fish' '$TREEHOUSE_PATH/admin/server_sync.fish' diff --git a/admin/client_sync.fish b/admin/client_sync.fish deleted file mode 100644 index d33af1a..0000000 --- a/admin/client_sync.fish +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env fish - -ssh $TREEHOUSE_SERVER -p $TREEHOUSE_SERVER_PORT 'fish' '$TREEHOUSE_PATH/admin/server_sync.fish'