Skip to content
This repository has been archived by the owner on Apr 13, 2018. It is now read-only.

Commit

Permalink
增加 launcher,修改 LICENSE 说明
Browse files Browse the repository at this point in the history
  • Loading branch information
wzpan committed Oct 28, 2017
1 parent 5c253bf commit 7f8c6e4
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 0 deletions.
24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# The MIT License (MIT)

*Copyright (c) 2017 Weizhou Pan(潘伟洲)*

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

dingdang-robot's main project skeleton is modified from Jasper project, under
MIT License. Their copyrights are also included.

*Copyright (c) 2014-2015 Charles Marsh, Shubhro Saha & Jan Holthuis*

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -19,3 +42,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

33 changes: 33 additions & 0 deletions launcher/dingdang-AutoUpdate-Launcher-for-pi-User.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
sleep 1

#Delete Cache
sudo rm -r /home/pi/.cache
sudo rm -r /home/pi/.config
sudo rm -r /home/pi/.netease-musicbox
sudo rm -r /home/pi/userInfo
sleep 1

#AutoUpdate Before Launch
#Update dingdang-robot
cd /home/pi/dingdang
git pull

#Update dingdang-contrib
cd /home/pi/.dingdang/contrib
git pull

#Update dingdang-contrib Requirements
sudo pip install --upgrade -r requirements.txt
sleep 1

#Restore Configuration of AlsaMixer
alsactl --file=/home/pi/asound.state restore
sleep 1

#Launch Dingdang in LxTerminal
lxterminal -e "python /home/pi/dingdang/dingdang.py"
sleep 1

#Start Respeaker-Switcher in Background
sudo python /home/pi/ReSpeaker-Switcher/switcher.py &
32 changes: 32 additions & 0 deletions launcher/dingdang-AutoUpdate-Launcher-for-root-User.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
sleep 1

#Delete Cache
sudo rm -r /root/.cache
sudo rm -r /root/.config
sudo rm -r /root/.netease-musicbox
sudo rm -r /root/userInfo
sleep 1

#Update dingdang-robot
cd /home/pi/dingdang
git pull

#Update dingdang-contrib
cd /home/pi/.dingdang/contrib
git pull

#Update dingdang-contrib Requirements
sudo pip install --upgrade -r requirements.txt
sleep 1

#Restore Configuration of AlsaMixer
alsactl --file=/home/pi/asound.state restore
sleep 1

#Launch Dingdang in LxTerminal
sudo lxterminal -e "python /home/pi/dingdang/dingdang.py"
sleep 1

#Start Respeaker-Switcher in Background
sudo python /home/pi/ReSpeaker-Switcher/switcher.py &
17 changes: 17 additions & 0 deletions launcher/dingdang-Launcher.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
sleep 1

#Delete Cache
sudo rm -r /root/.cache
sudo rm -r /root/.config
sudo rm -r /root/.netease-musicbox
sudo rm -r /root/userInfo

#Restore Configuration of AlsaMixer
alsactl --file=/home/pi/asound.state restore
sleep 1

#Start DingDang
sudo lxterminal -e "python /home/pi/dingdang/dingdang.py"
sleep 1
sudo python /home/pi/ReSpeaker-Switcher/switcher.py &

0 comments on commit 7f8c6e4

Please sign in to comment.