-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathcopy_back.sh
executable file
·22 lines (15 loc) · 1.14 KB
/
copy_back.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
MANIFEST="../core/homeassistant/components/apple_tv/manifest.json"
sudo chown -R postlund:postlund ../core/tests/components/apple_tv ../core/homeassistant/components/apple_tv
sudo chmod 664 -R ../core/tests/components/apple_tv ../core/homeassistant/components/apple_tv
sudo chmod 755 ../core/tests/components/apple_tv ../core/tests/components/apple_tv/__pycache__ ../core/homeassistant/components/apple_tv ../core/homeassistant/components/apple_tv/__pycache__ ../core/homeassistant/components/apple_tv/translations
# Copy back files to core
cp -r custom_components/apple_tv/* ../core/homeassistant/components/apple_tv
cp -r custom_components/apple_tv/translations/* ../core/homeassistant/components/apple_tv/translations
cp -r tests/apple_tv/* ../core/tests/components/apple_tv
# Remove version from manifest
sed '/"version"/d' -i $MANIFEST
# Change module paths back to core
sed -i 's/custom_components.apple_tv/homeassistant.components.apple_tv/g' ../core/tests/components/apple_tv/*.py
isort ../core/homeassistant/components/apple_tv ../core/tests/components/apple_tv
black ../core/homeassistant/components/apple_tv ../core/tests/components/apple_tv