# Ensure the script is executable.
chmod +x install.sh
# Run installer script
./install.sh
SPDX-License-Identifier: MIT
#!/bin/sh | |
# Install Spriter r10 on Ubuntu 20.04 LTS | |
# SPDX-License-Identifier: MIT | |
set -eu | |
# Install to the current working directory | |
INSTALL_DIR="$(pwd)" | |
# Directory inside the Spriter archive | |
SPRITER_DIR='SpriterR10(64)' | |
TMP="$(mktemp -d)" | |
# Download Spriter archive and missing dependencies | |
URL="https://brashmonkey.com/brashmonkey/spriter/linux/Spriter_free_R10.tar.gz http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb http://archive.ubuntu.com/ubuntu/pool/universe/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5ubuntu1_amd64.deb http://archive.ubuntu.com/ubuntu/pool/universe/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-2ubuntu0.2_amd64.deb" | |
cd "${TMP}" | |
for url in ${URL}; | |
do | |
curl -O "${url}" | |
done | |
# Extract libraries from dependency packages | |
DEB="$(find . -name '*.deb')" | |
for deb in ${DEB}; | |
do | |
DEB_DIR="$(echo ${deb} | sed 's/_amd64\.deb//g')" | |
mkdir "${DEB_DIR}" | |
cd "${DEB_DIR}" | |
cp "../${deb}" . | |
ar x *.deb | |
tar xf data.tar.xz | |
cd .. | |
done | |
# Remove dangling symlinks | |
find . -xtype l -exec rm {} \; | |
# Extract Spriter | |
tar xf Spriter_free_R10.tar.gz | |
# Copy dependency libraries to Spriter directory | |
cd "${SPRITER_DIR}" | |
find .. -name "*.so*" -exec cp -n "{}" . \; | |
# Copy Spriter directory to working directory | |
cd .. | |
cp -R "${SPRITER_DIR}" "${INSTALL_DIR}" | |
# Clean up temporary files | |
rm -rf "${TMP}" |