Mageia Bugzilla – Attachment 12810 Details for
Bug 28975
opencpn needs a new build, some of its plugin rpms need to be corrected or added
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
script to download the s63 source code from github
mk-tar-s63 (text/plain), 2.27 KB, created by
Philippe Didier
on 2021-06-22 23:09:13 CEST
(
hide
)
Description:
script to download the s63 source code from github
Filename:
MIME Type:
Creator:
Philippe Didier
Created:
2021-06-22 23:09:13 CEST
Size:
2.27 KB
patch
obsolete
>#!/bin/bash > >mk_tar() { ># mk-tar <upstream_name> <url> <tartype> <tar_name> >cd $wkdir >name=$1 >url=$2 >tartype=$3 >pkgname=$4 > >maj= >min= >patch= >tweak= >version= >[[ -d git ]] || mkdir git >cd git >[[ -d $name ]] && rm -rf $name >git clone $url $name >cd .. >rm -rf $name && cp -rf git/$name/ . >cd $name > >if [[ -f VERSION.cmake ]] ; then >maj=$(cat VERSION.cmake|grep "SET(PLUGIN_VERSION_MAJOR"|cut -d'"' -f2) >min=$(cat VERSION.cmake|grep "SET(PLUGIN_VERSION_MINOR"|cut -d'"' -f2) >patch=$(cat VERSION.cmake|grep "SET(PLUGIN_VERSION_PATCH"|cut -d'"' -f2) >tweak=$(cat VERSION.cmake|grep "SET(PLUGIN_VERSION_TWEAK"|cut -d'"' -f2) >fi > >if [[ -z $maj ]] ; then >maj=$(cat VERSION.cmake|grep "(VERSION_MAJOR"|cut -d'"' -f2) >min=$(cat VERSION.cmake|grep "(VERSION_MINOR"|cut -d'"' -f2) >patch=$(cat VERSION.cmake|grep "(VERSION_PATCH"|cut -d'"' -f2) >tweak=$(cat VERSION.cmake|grep "(VERSION_TWEAK"|cut -d'"' -f2) >fi > >if [[ -z $maj ]] ; then >maj=$(cat CMakeLists.txt|grep "(VERSION_MAJOR"|cut -d'"' -f2) >min=$(cat CMakeLists.txt|grep "(VERSION_MINOR"|cut -d'"' -f2) >patch=$(cat CMakeLists.txt|grep "(VERSION_PATCH"|cut -d'"' -f2) >tweak=$(cat CMakeLists.txt|grep "(VERSION_TWEAK"|cut -d'"' -f2) >fi > >if [[ -z $maj ]] ; then >maj=$(grep -r " PLUGIN_VERSION_MAJOR "|rev|cut -d' ' -f1|rev) >min=$(grep -r " PLUGIN_VERSION_MINOR "|rev|cut -d' ' -f1|rev) >patch=$(grep -r " PLUGIN_VERSION_PATCH "|rev|cut -d' ' -f1|rev) >fi >version=$maj.$min.$patch.$tweak >if [[ -z $tweak ]]; then >version=$maj.$min.$patch >fi >if [[ -z $patch ]]; then >version=$maj.$min >fi > >cd .. > >case $tartype in >tar.gz) >opt=z >;; >tar.bz2) >opt=j >;; >tar.xz) >opt=J >;; >tar) >opt= >;; >*) >echo "Unsupported compression type" >exit 1 >esac > >echo "Please wait creating tarball..." >[[ -f $name-$version.$tartype ]] && rm $name-$version.$tartype >tar --exclude-vcs -c"$opt"f $name-$version.$tartype $name/ >[[ $? = 0 ]] && chmod 644 $name-$version.$tartype && \ >echo "Written $name-$version.$tartype" > >rm -rf $name ># Clear vars created by this fn >pkgname= >name= >url= >tartype= >maj= >min= >patch= >tweak= >version= >opt= >chkflag= >} > ># Main routine ----------- ># Check we are in SOURCES >[[ $(pwd|rev|cut -d/ -f1|rev) = "SOURCES" ]] || { echo "Not in SOURCES directory - aborting!"; exit 1; } >wkdir=$(pwd) >rm -rf git >mk_tar s63_pi https://github.com/bdbcat/s63_pi/ tar.gz opencpn-s63-plugin >rm -rf git
#!/bin/bash mk_tar() { # mk-tar <upstream_name> <url> <tartype> <tar_name> cd $wkdir name=$1 url=$2 tartype=$3 pkgname=$4 maj= min= patch= tweak= version= [[ -d git ]] || mkdir git cd git [[ -d $name ]] && rm -rf $name git clone $url $name cd .. rm -rf $name && cp -rf git/$name/ . cd $name if [[ -f VERSION.cmake ]] ; then maj=$(cat VERSION.cmake|grep "SET(PLUGIN_VERSION_MAJOR"|cut -d'"' -f2) min=$(cat VERSION.cmake|grep "SET(PLUGIN_VERSION_MINOR"|cut -d'"' -f2) patch=$(cat VERSION.cmake|grep "SET(PLUGIN_VERSION_PATCH"|cut -d'"' -f2) tweak=$(cat VERSION.cmake|grep "SET(PLUGIN_VERSION_TWEAK"|cut -d'"' -f2) fi if [[ -z $maj ]] ; then maj=$(cat VERSION.cmake|grep "(VERSION_MAJOR"|cut -d'"' -f2) min=$(cat VERSION.cmake|grep "(VERSION_MINOR"|cut -d'"' -f2) patch=$(cat VERSION.cmake|grep "(VERSION_PATCH"|cut -d'"' -f2) tweak=$(cat VERSION.cmake|grep "(VERSION_TWEAK"|cut -d'"' -f2) fi if [[ -z $maj ]] ; then maj=$(cat CMakeLists.txt|grep "(VERSION_MAJOR"|cut -d'"' -f2) min=$(cat CMakeLists.txt|grep "(VERSION_MINOR"|cut -d'"' -f2) patch=$(cat CMakeLists.txt|grep "(VERSION_PATCH"|cut -d'"' -f2) tweak=$(cat CMakeLists.txt|grep "(VERSION_TWEAK"|cut -d'"' -f2) fi if [[ -z $maj ]] ; then maj=$(grep -r " PLUGIN_VERSION_MAJOR "|rev|cut -d' ' -f1|rev) min=$(grep -r " PLUGIN_VERSION_MINOR "|rev|cut -d' ' -f1|rev) patch=$(grep -r " PLUGIN_VERSION_PATCH "|rev|cut -d' ' -f1|rev) fi version=$maj.$min.$patch.$tweak if [[ -z $tweak ]]; then version=$maj.$min.$patch fi if [[ -z $patch ]]; then version=$maj.$min fi cd .. case $tartype in tar.gz) opt=z ;; tar.bz2) opt=j ;; tar.xz) opt=J ;; tar) opt= ;; *) echo "Unsupported compression type" exit 1 esac echo "Please wait creating tarball..." [[ -f $name-$version.$tartype ]] && rm $name-$version.$tartype tar --exclude-vcs -c"$opt"f $name-$version.$tartype $name/ [[ $? = 0 ]] && chmod 644 $name-$version.$tartype && \ echo "Written $name-$version.$tartype" rm -rf $name # Clear vars created by this fn pkgname= name= url= tartype= maj= min= patch= tweak= version= opt= chkflag= } # Main routine ----------- # Check we are in SOURCES [[ $(pwd|rev|cut -d/ -f1|rev) = "SOURCES" ]] || { echo "Not in SOURCES directory - aborting!"; exit 1; } wkdir=$(pwd) rm -rf git mk_tar s63_pi https://github.com/bdbcat/s63_pi/ tar.gz opencpn-s63-plugin rm -rf git
View Attachment As Raw
Actions:
View
Attachments on
bug 28975
:
12725
|
12726
|
12727
|
12728
|
12729
|
12730
|
12731
|
12732
|
12733
|
12734
|
12735
|
12736
|
12737
|
12738
|
12739
|
12740
|
12741
|
12742
|
12743
|
12744
|
12745
|
12746
|
12747
|
12748
|
12775
|
12776
|
12778
|
12779
|
12780
|
12781
|
12782
|
12783
|
12784
|
12785
|
12786
|
12787
|
12788
|
12789
|
12790
|
12791
|
12792
|
12793
|
12794
|
12795
|
12796
|
12797
|
12798
|
12799
|
12800
|
12801
|
12804
|
12805
|
12806
|
12807
|
12808
|
12809
| 12810 |
12811
|
12812
|
12813
|
12814
|
12815
|
12816
|
12817
|
12818
|
12819