2016-04-11 02:29:41 -04:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
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 14:43:33 -04:00
|
|
|
|
|
|
|
if [ -f files/python_games.hash ]; then
|
|
|
|
HASH_LOCAL=`cat files/python_games.hash`
|
|
|
|
fi
|
2016-04-11 02:29:41 -04: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
|
|
|
|
echo $HASH > files/python_games.hash
|
|
|
|
fi
|
|
|
|
|
|
|
|
ln -sf pip3 ${ROOTFS_DIR}/usr/bin/pip-3.2
|
|
|
|
|
|
|
|
install -v -o 1000 -g 1000 -d ${ROOTFS_DIR}/home/pi/python_games
|
|
|
|
tar xvf files/python_games.tar.gz -C ${ROOTFS_DIR}/home/pi/python_games --strip-components=1
|
|
|
|
chown 1000:1000 ${ROOTFS_DIR}/home/pi/python_games -Rv
|
|
|
|
chmod +x ${ROOTFS_DIR}/home/pi/python_games/launcher.sh
|
|
|
|
|
|
|
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/pi/Documents"
|
|
|
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/pi/Documents/BlueJ Projects"
|
|
|
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/pi/Documents/Greenfoot Projects"
|
|
|
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/pi/Documents/Scratch Projects"
|
2016-05-09 13:29:21 -04:00
|
|
|
rsync -a --chown=1000:1000 ${ROOTFS_DIR}/usr/share/doc/BlueJ/ "${ROOTFS_DIR}/home/pi/Documents/BlueJ Projects"
|
|
|
|
rsync -a --chown=1000:1000 ${ROOTFS_DIR}/usr/share/doc/Greenfoot/ "${ROOTFS_DIR}/home/pi/Documents/Greenfoot Projects"
|
|
|
|
rsync -a --chown=1000:1000 ${ROOTFS_DIR}/usr/share/scratch/Projects/Demos/ "${ROOTFS_DIR}/home/pi/Documents/Scratch Projects"
|
2016-04-11 02:29:41 -04:00
|
|
|
|
2016-05-09 13:29:21 -04:00
|
|
|
#Alacarte fixes
|
2016-04-11 02:29:41 -04:00
|
|
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/pi/.local"
|
|
|
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/pi/.local/share"
|
|
|
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/pi/.local/share/applications"
|
2016-05-09 13:29:21 -04:00
|
|
|
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/pi/.local/share/desktop-directories"
|