Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
69a603ce
Commit
69a603ce
authored
Mar 30, 2024
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play virtualhere: replace legacy converting code to epm pack using
parent
887a2539
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
28 deletions
+25
-28
virtualhere.sh
pack.d/virtualhere.sh
+18
-0
virtualhere.sh
play.d/virtualhere.sh
+7
-28
No files found.
pack.d/virtualhere.sh
0 → 100755
View file @
69a603ce
#!/bin/sh
TAR
=
"
$1
"
RETURNTARNAME
=
"
$2
"
VERSION
=
"
$3
"
.
$(
dirname
$0
)
/common.sh
BINNAME
=
vhusbd
PRODUCT
=
virtualhere
PKGNAME
=
$PRODUCT
-
$VERSION
# https://github.com/virtualhere/script/blob/main/install_server
install
-m0755
-D
"
$TAR
"
opt/
$PRODUCT
/
$BINNAME
||
fatal
erc a
$PKGNAME
.tar opt
return_tar
$PKGNAME
.tar
play.d/virtualhere.sh
View file @
69a603ce
#!/bin/sh
PKGNAME
=
virtualhere
PRODUCTDIR
=
/opt/
$PKGNAME
BINNAME
=
vhusbd
SUPPORTEDARCHES
=
"x86_64 armhf mips mipsel aarch64 x86"
VERSION
=
"
$2
"
DESCRIPTION
=
'Generic VirtualHere USB Server from the official site'
URL
=
"https://www.virtualhere.com/"
.
$(
dirname
$0
)
/common.sh
warn_version_is_not_supported
arch
=
"
$(
epm print info
-a
)
"
case
"
$arch
"
in
x86_64
)
...
...
@@ -34,39 +35,17 @@ case "$arch" in
;;
esac
pkgtype
=
"
$(
epm print info
-p
)
"
tdir
=
$(
mktemp
-d
)
trap
"rm -fr
$tdir
"
EXIT
mkdir
-p
$tdir
/opt/
$PKGNAME
/
cd
$tdir
||
fatal
# https://github.com/virtualhere/script/blob/main/install_server
epm tool eget
-O
opt/
$PKGNAME
/
$BINNAME
https://www.virtualhere.com/sites/default/files/usbserver/
$file
||
fatal
chmod
0755 opt/
$PKGNAME
/
$BINNAME
pack_tar
()
{
local
tarname
=
"
$1
"
local
file
=
"
$2
"
local
destfile
=
"
$3
"
[
-n
"
$destfile
"
]
||
destfile
=
"
$PRODUCTDIR
/
$(
basename
$file
)
"
local
dest
=
$(
dirname
$destfile
)
mkdir
-p
.
$dest
[
-s
.
$dest
/
$(
basename
$file
)
]
||
cp
-v
$file
.
$dest
/
a
=
''
tar
cf
$tarname
.
$(
dirname
$dest
)
}
# https://www.virtualhere.com/sites/default/files/usbserver/vhusbdx86_64
PKGURL
=
"https://www.virtualhere.com/sites/default/files/usbserver/
$file
"
# FIXME
VERSION
=
"*"
if
[
"
$VERSION
"
=
"*"
]
;
then
VERSION
=
"
$(
e
pm tool e
get
-O-
https://virtualhere.com/usb_server_software |
grep
"<strong>Version"
|
sed
-e
's|.*<strong>Version ||'
-e
's|</strong>.*||'
)
"
VERSION
=
"
$(
eget
-O-
https://virtualhere.com/usb_server_software |
grep
"<strong>Version"
|
sed
-e
's|.*<strong>Version ||'
-e
's|</strong>.*||'
)
"
[
-n
"
$VERSION
"
]
||
fatal
"Can't get version for
$PKGNAME
"
fi
PKG
=
$PKGNAME
-
$VERSION
.tar
pack_tar
$PKG
opt/
$PKGNAME
/
$BINNAME
epm
install
--repack
"
$PKG
"
||
exit
epm pack
--install
$PKGNAME
"
$PKGURL
"
$VERSION
||
exit
echo
echo
"Note: run
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment