mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-10 03:50:33 +03:00
restore the README files
view_app_file(), view_readmes(): This puts the dep info back into the README display by cat'ing the README and grep'ing the .info file into a temporary README. This doesn't touch the command line show_readme() as that actually shows both the README and .info files already.
This commit is contained in:
parent
0ac0bd7ad1
commit
1153577dc9
@ -1180,6 +1180,7 @@ view_app_file() {
|
|||||||
local FILE="$2"
|
local FILE="$2"
|
||||||
local PLAIN
|
local PLAIN
|
||||||
local AFSP=$SBOPKGTMP/sbopkg_app_files_selection_parsed
|
local AFSP=$SBOPKGTMP/sbopkg_app_files_selection_parsed
|
||||||
|
local RESTORED_README=$SBOPKGTMP/restored_readme
|
||||||
|
|
||||||
cd $DIR
|
cd $DIR
|
||||||
case $FILE in
|
case $FILE in
|
||||||
@ -1192,7 +1193,13 @@ view_app_file() {
|
|||||||
* ) PLAIN=yes ;;
|
* ) PLAIN=yes ;;
|
||||||
esac
|
esac
|
||||||
if [[ "$PLAIN" == yes ]]; then
|
if [[ "$PLAIN" == yes ]]; then
|
||||||
dialog --exit-label "OK" --title "$FILE" --textbox "$FILE" 0 0
|
# If it's a README, splice the damned deps back into its display.
|
||||||
|
FILENAME=$FILE
|
||||||
|
if [[ $FILE == README ]]; then
|
||||||
|
{ cat README; echo; grep '^REQUIRES=' *.info; } > $RESTORED_README
|
||||||
|
FILE=$RESTORED_README
|
||||||
|
fi
|
||||||
|
dialog --exit-label "OK" --title "$FILENAME" --textbox "$FILE" 0 0
|
||||||
else
|
else
|
||||||
dialog --exit-label "OK" --title "Parsed contents of $FILE" \
|
dialog --exit-label "OK" --title "Parsed contents of $FILE" \
|
||||||
--textbox "$AFSP" 0 0
|
--textbox "$AFSP" 0 0
|
||||||
@ -2209,6 +2216,7 @@ view_readmes() {
|
|||||||
local NAME ONOFF PICK READMES
|
local NAME ONOFF PICK READMES
|
||||||
|
|
||||||
READMES=$(find $REPO_DIR -mindepth 3 -maxdepth 3 -name README)
|
READMES=$(find $REPO_DIR -mindepth 3 -maxdepth 3 -name README)
|
||||||
|
INFOS=$(find $REPO_DIR -mindepth 3 -maxdepth 3 -name *.info)
|
||||||
|
|
||||||
printf "$HEADER_STRING\n" > $HEAD_FILE
|
printf "$HEADER_STRING\n" > $HEAD_FILE
|
||||||
|
|
||||||
@ -2227,7 +2235,11 @@ view_readmes() {
|
|||||||
echo >> $READMES_FILE
|
echo >> $READMES_FILE
|
||||||
tin_text $NAME >> $READMES_FILE
|
tin_text $NAME >> $READMES_FILE
|
||||||
echo >> $READMES_FILE
|
echo >> $READMES_FILE
|
||||||
cat $(grep /$NAME/README\$ <<< "$READMES") >> $READMES_FILE
|
{
|
||||||
|
cat $(grep /$NAME/README\$ <<< "$READMES")
|
||||||
|
echo
|
||||||
|
grep '^REQUIRES=' $(grep /$NAME/*.info <<< "$INFOS")
|
||||||
|
} >> $READMES_FILE
|
||||||
done < $INPUT
|
done < $INPUT
|
||||||
|
|
||||||
tin_text "$(< $HEAD_FILE)" > $REPORT_FILE
|
tin_text "$(< $HEAD_FILE)" > $REPORT_FILE
|
||||||
|
Loading…
Reference in New Issue
Block a user