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
Nurlan
eepm
Commits
2f631b4a
Commit
2f631b4a
authored
Feb 02, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prescription: add Visual Studio Code install
parent
b51391ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
0 deletions
+74
-0
code.sh
prescription.d/code.sh
+55
-0
code.sh
repack.d/code.sh
+19
-0
No files found.
prescription.d/code.sh
0 → 100755
View file @
2f631b4a
#!/bin/sh -x
# TODO: common place
fatal
()
{
echo
"FATAL:
$*
"
>
&2
exit
1
}
PKGNAME
=
code
if
[
"
$1
"
=
"--remove"
]
;
then
epm remove
$PKGNAME
exit
fi
[
"
$1
"
!=
"--run"
]
&&
echo
"Install Visual Studio Code from the official site"
&&
exit
arch
=
"
$(
$DISTRVENDOR
-a
)
"
case
"
$arch
"
in
x86_64
)
arch
=
x64
;;
armhf
)
;;
aarch64
)
arch
=
arm64
;;
*
)
fatal
"
$arch
arch is not supported"
;;
esac
pkgtype
=
"
$(
$DISTRVENDOR
-p
)
"
repack
=
''
case
"
$pkgtype
"
in
deb
)
repack
=
'--repack'
;;
rpm
)
;;
*
)
fatal
"Package format
$pkgtype
is not supported yet"
esac
# we have workaround for their postinstall script, so always repack rpm package
[
"
$(
$DISTRVENDOR
-p
)
"
=
"deb"
]
||
repack
=
'--repack'
PKG
=
/tmp/
$PKGNAME
.
$pkgtype
# TODO: wget does not support: Content-Disposition: attachment; filename="code-1.52.1-1608137084.el7.x86_64.rpm"
$EGET
-O
$PKG
"https://code.visualstudio.com/sha/download?build=stable&os=linux-
$pkgtype
-
$arch
"
||
fatal
epm
install
$repack
"
$PKG
"
||
exit
rm
-fv
$PKG
repack.d/code.sh
0 → 100755
View file @
2f631b4a
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT
=
"
$1
"
SPEC
=
"
$2
"
PRODUCT
=
code
subst
'1iAutoReq:yes,nomonolib,nomono'
$SPEC
subst
'1iAutoProv:no'
$SPEC
subst
's|\(.*/usr/share/code/code.*\)|"/usr/bin/code"\n"/usr/bin/vscode"\n\1|'
$SPEC
mkdir
-p
$BUILDROOT
/usr/bin/
ln
-rs
$BUILDROOT
/usr/share/code/code
$BUILDROOT
/usr/bin/code
ln
-rs
$BUILDROOT
/usr/share/code/code
$BUILDROOT
/usr/bin/vscode
# install all requires packages before packing (the list have got with rpmreqs package | xargs echo)
epm
install
--skip-installed
at-spi2-atk coreutils findutils firefox gawk glib2 libalsa libatk libat-spi2-core libcairo libdbus libdrm libexpat libgbm libgdk-pixbuf libgio libgtk+3 libnspr libnss libpango libsecret libX11 libxcb libXcomposite libXcursor libXdamage libXext libXfixes libXi libxkbfile libXrandr libXrender libXScrnSaver libXtst
sed
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