This repository has been archived by the owner on Apr 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
93 additions
and
56 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
sleep 1 | ||
|
||
# tmux session name | ||
session_name="dingdang" | ||
|
||
#Delete Cache | ||
sudo rm -r $HOME/.cache | ||
sudo rm -r $HOME/.netease-musicbox | ||
sudo rm -r $HOME/userInfo | ||
sleep 1 | ||
|
||
#AutoUpdate Before Launch | ||
#Update dingdang-robot | ||
cd $HOME/dingdang | ||
git pull | ||
|
||
#Update dingdang-contrib | ||
cd $HOME/.dingdang/contrib | ||
git pull | ||
|
||
#Update dingdang-contrib Requirements | ||
sudo pip install --upgrade -r requirements.txt | ||
sleep 1 | ||
|
||
#Restore Configuration of AlsaMixer | ||
if [ -f $HOME/asound.state ]; then | ||
alsactl --file=$HOME/asound.state restore | ||
sleep 1 | ||
fi | ||
|
||
#Launch Dingdang in tmux | ||
tmux new-session -d -s $session_name $HOME/dingdang/dingdang.py | ||
sleep 1 | ||
|
||
#Start Respeaker-Switcher in Background | ||
if [ -d $HOME/ReSpeaker-Switcher]; then | ||
sudo python $HOME/ReSpeaker-Switcher/switcher.py & | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
sleep 1 | ||
|
||
#Delete Cache | ||
sudo rm -r /root/.cache | ||
sudo rm -r /root/.netease-musicbox | ||
sudo rm -r /root/userInfo | ||
|
||
#Restore Configuration of AlsaMixer | ||
if [ -f /home/pi/asound.state ]; then | ||
alsactl --file=/home/pi/asound.state restore | ||
sleep 1 | ||
fi | ||
|
||
#Start DingDang | ||
sudo tmux new-session -d -s $session_name $HOME/dingdang/dingdang.py | ||
sleep 1 | ||
|
||
if [ -d /home/pi/ReSpeaker-Switcher]; then | ||
sudo python /home/pi/ReSpeaker-Switcher/switcher.py & | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
sleep 1 | ||
|
||
#Delete Cache | ||
sudo rm -r /root/.cache | ||
sudo rm -r /root/.netease-musicbox | ||
sudo rm -r /root/userInfo | ||
|
||
#Restore Configuration of AlsaMixer | ||
if [ -f /home/pi/asound.state ]; then | ||
alsactl --file=/home/pi/asound.state restore | ||
sleep 1 | ||
fi | ||
|
||
#Start DingDang | ||
tmux new-session -d -s $session_name $HOME/dingdang/dingdang.py | ||
sleep 1 | ||
|
||
if [ -d /home/pi/ReSpeaker-Switcher]; then | ||
sudo python /home/pi/ReSpeaker-Switcher/switcher.py & | ||
fi |