2016-04-11 06:29:41 +00:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2018-03-02 20:08:24 +00:00
|
|
|
HASH="$(wget https://api.github.com/repos/KenT2/python-games/git/refs/heads/master -qO -| grep \"sha\" | cut -f 2 -d ':' | cut -f 2 -d \")"
|
2016-05-05 18:43:33 +00:00
|
|
|
|
|
|
|
if [ -f files/python_games.hash ]; then
|
2018-03-02 20:08:24 +00:00
|
|
|
HASH_LOCAL="$(cat files/python_games.hash)"
|
2016-05-05 18:43:33 +00:00
|
|
|
fi
|
2016-04-11 06:29:41 +00:00
|
|
|
|
|
|
|
if [ ! -e files/python_games.tar.gz ] || [ "$HASH" != "$HASH_LOCAL" ]; then
|
|
|
|
wget "https://github.com/KenT2/python-games/tarball/master" -O files/python_games.tar.gz
|
2018-03-02 20:08:24 +00:00
|
|
|
echo "$HASH" > files/python_games.hash
|
2016-04-11 06:29:41 +00:00
|
|
|
fi
|
|
|
|
|
2018-03-02 20:08:24 +00:00
|
|
|
ln -sf pip3 "${ROOTFS_DIR}/usr/bin/pip-3.2"
|
2016-04-11 06:29:41 +00:00
|
|
|
|
2018-03-18 13:08:22 +00:00
|
|
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${RPI_USERNAME}/python_games"
|
|
|
|
tar xvf files/python_games.tar.gz -C "${ROOTFS_DIR}/home/${RPI_USERNAME}/python_games" --strip-components=1
|
|
|
|
chown 1000:1000 "${ROOTFS_DIR}/home/${RPI_USERNAME}/python_games" -Rv
|
|
|
|
chmod +x "${ROOTFS_DIR}/home/${RPI_USERNAME}/python_games/launcher.sh"
|
|
|
|
|
2016-04-11 06:29:41 +00:00
|
|
|
|
2016-05-09 17:29:21 +00:00
|
|
|
#Alacarte fixes
|
2018-03-18 13:08:22 +00:00
|
|
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${RPI_USERNAME}/.local"
|
|
|
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${RPI_USERNAME}/.local/share"
|
|
|
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${RPI_USERNAME}/.local/share/applications"
|
|
|
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${RPI_USERNAME}/.local/share/desktop-directories"
|