checking to see if opt/mycroft/skills exists and is writable

pull/631/head
Arron Atchison 2017-04-03 12:30:47 -07:00
parent 4d8f7f6e13
commit c8c3b3d67f
1 changed files with 11 additions and 2 deletions

View File

@ -1,8 +1,17 @@
#!/usr/bin/env bash
SKILLS_DIR='/opt/mycroft/skills'
# exit on any error
set -Ee
rm -rf msm
git clone https://github.com/MycroftAI/msm.git msm
chmod +x msm/msm
sudo mkdir -p /opt/mycroft/skills
sudo chown $USER:$USER /opt/mycroft/skills
if [ ! -d ${SKILLS_DIR} ]; then
sudo chown $USER:$USER ${SKILLS_DIR}
fi
if [ ! -w ${SKILLS_DIR} ]; then
sudo mkdir -p ${SKILLS_DIR}
fi