41 lines
1.4 KiB
Bash
41 lines
1.4 KiB
Bash
#!/bin/bash
|
|
|
|
# made by Vane Vander <https://mayvaneday.keybase.pub>
|
|
# this is version 0.1.2, last edited on 3 March 2019
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
USERNAME=seliph
|
|
HOME=/home/kodachi
|
|
|
|
if [ "$1" = "clearall" ]
|
|
then
|
|
rm ~/.plan
|
|
touch ~/.plan
|
|
sftp -q -i ~/.ssh/circumlunar.space $USERNAME@circumlunar.space <<< $"put -p $HOME/.plan"
|
|
sftp -q -i ~/.ssh/tilde.team solstice@tilde.team <<< $"put -p $HOME/.plan"
|
|
echo "status file has been cleared"
|
|
fi
|
|
if [ "$1" = "post" ]
|
|
then
|
|
echo $2 > ~/.plan
|
|
date >> ~/.plan
|
|
sleep 0.5
|
|
echo "status received!"
|
|
sftp -q -i ~/.ssh/circumlunar.space $USERNAME@circumlunar.space <<< $"put -p $HOME/.plan"
|
|
sftp -q -i ~/.ssh/tilde.team solstice@tilde.team <<< $"put -p $HOME/.plan"
|
|
sleep 0.5
|
|
echo "status has been posted!"
|
|
fi
|