Merge pull request #15 from floreal/packaging-helper-scripts
Enhancement: better packaging scripts
This commit is contained in:
commit
286912dbf2
|
@ -1,3 +1,5 @@
|
||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "MacTypes-sys"
|
name = "MacTypes-sys"
|
||||||
version = "2.1.0"
|
version = "2.1.0"
|
||||||
|
|
22
install.sh
22
install.sh
|
@ -1,7 +1,19 @@
|
||||||
cargo build --release
|
#!/usr/bin/env sh
|
||||||
sudo cp target/release/mobydick $PREFIX/bin/xyz.gelez.mobydick
|
if [ -z "$PREFIX" ]; then
|
||||||
sudo cp *.appdata.xml $PREFIX/share/appdata/
|
PREFIX=/usr/local
|
||||||
sudo cp *.desktop $PREFIX/share/applications/
|
fi
|
||||||
|
|
||||||
|
if [ ! -f target/release/mobydick ]; then
|
||||||
|
./build.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo install -v -d $PREFIX/bin/
|
||||||
|
sudo install -v target/release/mobydick $PREFIX/bin/xyz.gelez.mobydick
|
||||||
|
sudo install -v -d $PREFIX/share/appdata
|
||||||
|
sudo install -v -t $PREFIX/share/appdata *.appdata.xml
|
||||||
|
sudo install -v -d $PREFIX/share/applications
|
||||||
|
sudo install -v -t $PREFIX/share/applications *.desktop
|
||||||
for s in "16" "24" "32" "48" "64" "128"; do
|
for s in "16" "24" "32" "48" "64" "128"; do
|
||||||
sudo cp icons/$s.svg $PREFIX/share/icons/hicolor/${s}x${s}/mobydick.svg
|
sudo install -v -d $PREFIX/share/icons/hicolor/${s}x${s}/
|
||||||
|
sudo install -v icons/$s.svg $PREFIX/share/icons/hicolor/${s}x${s}/mobydick.svg
|
||||||
done
|
done
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -z "$PREFIX" ]; then
|
||||||
|
PREFIX=/usr/local
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo rm -v $PREFIX/bin/xyz.gelez.mobydick
|
||||||
|
sudo rm -v $PREFIX/share/appdata/$(ls *.appdata.xml)
|
||||||
|
sudo rm -v $PREFIX/share/applications/$(ls *.desktop)
|
||||||
|
|
||||||
|
for s in "16" "24" "32" "48" "64" "128"; do
|
||||||
|
sudo rm -v $PREFIX/share/icons/hicolor/${s}x${s}/mobydick.svg
|
||||||
|
done
|
Loading…
Reference in New Issue