Skip to content

Instantly share code, notes, and snippets.

@bradfordzhang
Last active August 19, 2022 03:12
Show Gist options
  • Save bradfordzhang/178233a8d71155927ab2540fd8cc3db6 to your computer and use it in GitHub Desktop.
Save bradfordzhang/178233a8d71155927ab2540fd8cc3db6 to your computer and use it in GitHub Desktop.
release MSP
version=$(git describe --tags)
version1=${version#v}
VERSION=${version1%%-*}
mkdir -p deb/DEBIAN
mkdir -p deb/lib/systemd/system
mkdir -p deb/usr/bin
cp ./minecraftspeedproxy deb/usr/bin
tee deb/lib/systemd/system/Minecraft-Speed-Proxy.service <<-'EOF'
[Unit]
Description=Minecraft speedup program
[Service]
type=forking
ExecStart=sudo minecraftspeedproxy -c /etc/minecraftspeedproxy/config.json
EOF
cd deb/DEBIAN
touch control postinst postrm
chmod 755 control postinst postrm
tee control <<-'EOF'
Package: Minecraft-Speed-Proxy
EOF
echo Version: $VERSION >> control
tee control -a <<-'EOF'
Architecture: amd64
Maintainer: AllesUgo<yangpengxuanab@outlook.com>
Installed-Size: 67K
Provides: optional
Section: net
Description: Minecraft speedup program.
EOF
echo 'sudo systemctl daemon-reload' >> postinst
echo 'sudo systemctl daemon-reload' >> postrm
cd ../..
dpkg -b deb/ Minecraft-Speed-Proxy-linux-amd64.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment