-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add package: webinterface-upload-button v1.0.1 (#771)
* Add package: webinterface-upload-button v1.0.1 * auto apply/revert; reinstall on reenable * remove alias
- Loading branch information
1 parent
d3d57d3
commit 5239181
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2021 The Toltec Contributors | ||
# SPDX-License-Identifier: MIT | ||
|
||
_pkgname='webinterface-upload-button' | ||
pkgnames=("$_pkgname") | ||
pkgdesc="A simple upload button for the web interface" | ||
url="https://github.com/rM-self-serve/$_pkgname" | ||
pkgver=1.0.1-1 | ||
timestamp=2023-12-06T11:43:00Z | ||
section="utils" | ||
maintainer="rM-self-serve <[email protected]>" | ||
license=MIT | ||
|
||
source=( | ||
"$url"/archive/1c69d4fcaa1cb8e2cf4b022a190429dc39946498.zip | ||
) | ||
sha256sums=( | ||
a388d1db49a3c35782600efbd94ee449c59f46c223f14c254cb74d9509255d96 | ||
) | ||
|
||
package() { | ||
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir/$_pkgname" | ||
|
||
touch "$srcdir"/emptyfile | ||
install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/"$_pkgname" "$srcdir"/emptyfile | ||
} | ||
|
||
configure() { | ||
echo | ||
echo "Applying webinterface-upload-button" | ||
webinterface-upload-button apply -y > /dev/null | ||
echo "Success" | ||
echo | ||
} | ||
|
||
_restore() { | ||
echo | ||
echo "Reverting webinterface-upload-button" | ||
webinterface-upload-button revert -y > /dev/null | ||
echo "Success" | ||
echo | ||
} | ||
|
||
preremove() { | ||
_restore | ||
} | ||
|
||
preupgrade() { | ||
_restore | ||
} |