about summary refs log blame commit diff stats
path: root/install.sh
blob: 7f6803ee446b5a324df06c0470277b5d3308ab16 (plain) (tree)
1
2
3
4
5
6
7
8
9
         
      
 
                                           
                        


                      
                         


      



                               

                                       
 




                                                                      

                                                                                               

                  




                                                                                      
                                                                                                 
                                                                                                   
  
 

                       
#!/bin/sh
set -e

# Check if another config is being sourced.
if [ -z "$TUP_CONFIG" ];
then
	. ./tup.config
else
	. ./"$TUP_CONFIG"
fi

set -u

echo "Installing Project."
set -x
mkdir -p $CONFIG_INSTALL_PREFIX
cp -r resources $CONFIG_INSTALL_PREFIX/
cp -r docs $CONFIG_INSTALL_PREFIX/

case "$(uname -s)" in
	MINGW*)
		cp $CONFIG_BUILD_DIR/bin/Pong* $CONFIG_INSTALL_PREFIX/
		;;
	*)
		install -m755 src/launch.sh $CONFIG_INSTALL_PREFIX/Pong
		cat "$CONFIG_BUILD_DIR"/bin/Pong* | gzip -9 -c >> "$CONFIG_INSTALL_PREFIX"/Pong
		;;
esac

if [ "$CONFIG_FLATPAK" = "true" ];
then
	install -Dm755 src/flatpak/flatpak_launch.sh /app/bin/flatpak_launch.sh
	install -Dm644 src/Pong.desktop /app/share/applications/net.iotib.Pong.desktop
	install -Dm644 net.iotib.Pong.metainfo.xml /app/share/appdata/net.iotib.Pong.metainfo.xml
	install -Dm644 resources/icon.svg /app/share/icons/hicolor/scalable/apps/net.iotib.Pong.svg
fi

set +x
echo "Done Installing."