Commit 17a80a1d authored by Vitaly Lipatov's avatar Vitaly Lipatov

update pack_in_onefile script

parent cef80e2e
......@@ -39,8 +39,8 @@ See detailed description here: http://wiki.etersoft.ru/EPM
%install
# install to datadir and so on
%makeinstall version=%version-%release
./pack_in_onefile.sh
install -m 0755 *packed.sh %buildroot/%_datadir/%name/
install -m 0755 packed/epm.sh %buildroot/%_datadir/%name/epm-packed.sh
install -m 0755 packed/serv.sh %buildroot/%_datadir/%name/serv-packed.sh
mkdir -p %buildroot%_sysconfdir/bash_completion.d/
install -m 0644 bash_completion/serv %buildroot%_sysconfdir/bash_completion.d/serv
......
......@@ -34,14 +34,22 @@ cat <<EOF >>$OUTPUT
EOF
}
get_version()
{
grep "^Version:" eepm.spec | head -n1 | sed "s|Version: *||g"
}
filter_out()
{
grep -v "^load_helper " | sed -e 's|DISTRVENDOR=$PROGDIR/distr_info|DISTRVENDOR=internal_distr_info|g'
grep -v "^load_helper " | sed -e 's|DISTRVENDOR=$PROGDIR/distr_info|DISTRVENDOR=internal_distr_info|g' | \
sed -e "s|@VERSION@|$(get_version)|g"
}
incorporate_all()
{
OUTPUT=$PACKCOMMAND-packed.sh
mkdir -p packed
OUTPUT=packed/$PACKCOMMAND.sh
echo -n >$OUTPUT
awk 'BEGIN{desk=0}{if(/^load_helper epm-sh-functions/){desk++};if(desk==0) {print}}' <bin/$PACKCOMMAND | filter_out >>$OUTPUT
......@@ -54,6 +62,7 @@ done | filter_out >>$OUTPUT
incorporate_distr_info
awk 'BEGIN{desk=0}{if(desk>0) {print} ; if(/^load_helper epm-sh-functions/){desk++}}' <bin/$PACKCOMMAND | filter_out >>$OUTPUT
chmod 0755 $OUTPUT
}
###############
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment