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
1861c683
Commit
1861c683
authored
Jul 17, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tools/update_versions.sh
parent
4e94cf93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
18 deletions
+50
-18
update_versions.sh
tests/update_versions.sh
+50
-18
No files found.
tests/update_versions.sh
View file @
1861c683
...
...
@@ -16,29 +16,61 @@ rm -f $EDIR/errors.txt
EPM
=
$(
realpath
$(
dirname
$0
)
/../bin/epm
)
install_app
()
{
local
app
=
"
$1
"
local
applog
=
"
$1
"
local
alt
=
"
$2
"
[
-n
"
$alt
"
]
&&
applog
=
"
$applog
.
$alt
"
echo
"epm play
$app
$alt
"
$EPM
play
--verbose
--auto
$app
$alt
>
$EDIR
/
$applog
2>&1
||
return
mv
-f
$EDIR
/
$applog
$LDIR
/
$applog
local
pkgname
=
"
$(
$EPM
play
--package-name
$app
$alt
)
"
$EPM
print version
for
package
$pkgname
>
$TDIR
/
$pkgname
2>
$EDIR
/
$pkgname
&&
rm
-f
$EDIR
/
$pkgname
[
-s
$TDIR
/
$pkgname
]
||
echo
"empty file
$TDIR
/
$pkgname
"
>>
$EDIR
/errors.txt
}
install_app_alt
()
{
local
app
=
"
$1
"
local
productalt
=
"
$(
$EPM
play
--product-alternatives
$app
)
"
if
[
-z
"
$productalt
"
]
;
then
install_app
$app
return
fi
# оставляем дефолтный вариант в конце в системе
for
i
in
$productalt
""
;
do
$EPM
play
--remove
--auto
$app
install_app
$app
$i
done
}
if
[
-n
"
$1
"
]
;
then
install_app_alt
"
$1
"
exit
fi
# install/update all
$EPM
play
--list-all
--short
|
while
read
app
;
do
pkgname
=
"
$(
$EPM
play
--package-name
$app
</dev/null
)
"
if
$EPM
play
--verbose
--auto
$app
</dev/null
>
$EDIR
/
$app
2>&1
;
then
# if OK, move output
mv
-f
$EDIR
/
$app
$LDIR
/
$app
$EPM
play installed-version
$app
>
$TDIR
/
$app
2>
$EDIR
/
$pkgname
</dev/null
&&
rm
-f
$EDIR
/
$pkgname
[
-s
$TDIR
/
$app
]
||
echo
"empty file
$TDIR
/
$app
"
>>
$EDIR
/errors.txt
#else
# if not OK, keep old version file (try to avoid updating)
# rm -f $TDIR/$app
fi
install_app_alt
$app
</dev/null
done
cd
$TDIR
[
-d
.git
]
||
git init
git add
*
git commit
-m
"updated"
commit_git
()
{
cd
"
$1
"
||
return
[
-d
.git
]
||
git init
git add
*
git commit
-m
"updated"
}
cd
$EDIR
[
-d
.git
]
||
git init
git add
*
git commit
-m
"updated"
commit_git
$TDIR
commit_git
$EDIR
commit_git
$LDIR
cd
$TMP
rm
-rf
tmp.
*
rpm-tmp.
*
...
...
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