Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lipstick
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osak
lipstick
Commits
98af3519
Commit
98af3519
authored
9 years ago
by
christian
Browse files
Options
Downloads
Patches
Plain Diff
added makeDoku.sh still broken
parent
a9b930d7
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/makeDoku.sh
+56
-0
56 additions, 0 deletions
scripts/makeDoku.sh
with
56 additions
and
0 deletions
scripts/makeDoku.sh
0 → 100755
+
56
−
0
View file @
98af3519
#!/bin/bash
# Takes 2 arguments, first path where docuparts are stored 2nd list of installed packages
if
[
$#
-eq
0
]
then
echo
"No path supplied"
exit
1
else
DOCUDIR
=
"
$1
../Doku"
echo
$DOCUDIR
fi
if
[
$#
-le
1
]
then
echo
"No packages supplied"
exit
1
else
PACKAGELIST
=
$2
echo
$PACKAGELIST
fi
DOCUDIR
=
"
$MY_DIR
/../Doku"
if
[
!
-f
"
$DOCUDIR
/HEADER.tex"
]
;
then
#HEADER muss ex. sonst kommt auf keinen Fall was sinnvolles bei rum
echo
"Leider ist keine Dokumentation auf dem LIP-Stick vorhanden..."
return
0
#linuxparty.sh soll auch ohne Doku Verzeichnis laufen
fi
#DOCFILE=$(mktemp --suffix='.tex')
WORKING_DIR
=
$(
mktemp
-d
)
cp
-a
"
$DOCUDIR
/."
"
$WORKING_DIR
"
for
PACKAGE
in
$INSTALLED_PKGS
;
do
#zenity and kdialog return quoted package names; nice for apt call but bad here
CLEAN_PACKAGE_NAME
=
$(
echo
"
$PACKAGE
"
|
tr
-d
"
\"
"
)
echo
"Dokumentation fuer
$PACKAGE
von
${
WORKING_DIR
}
/
${
CLEAN_PACKAGE_NAME
}
.tex"
if
[
-f
"
${
WORKING_DIR
}
/
${
CLEAN_PACKAGE_NAME
}
.tex"
]
;
then
echo
"
\\
input{
${
CLEAN_PACKAGE_NAME
}
.tex}"
>>
"
$WORKING_DIR
/DOCUMENTATION.gen.tex"
#cat "${DOCUDIR}/${CLEAN_PACKAGE_NAME}.tex" >> "$DOCFILE"
fi
done
pushd
"
$WORKING_DIR
"
pdflatex
-output-directory
"
$WORKING_DIR
"
"DOCUMENTATION.gen.tex"
pdflatex
-output-directory
"
$WORKING_DIR
"
"DOCUMENTATION.gen.tex"
# ja, ist Absicht
if
[
$?
-ne
0
]
;
then
err
"Fehler beim kompilieren der Dokumentation."
return
1
fi
popd
USER_HOME
=
$(
getent passwd
"
${
SUDO_USER
:-
$USER
}
"
|
cut
-d
':'
-f6
)
cp
"
${
WORKING_DIR
}
/DOCUMENTATION.gen.pdf"
"
${
USER_HOME
}
/Deine-LIP-Dokumentation.pdf"
RC
=
$?
pressenter
"Dokummentation der von dir installierten Paktete wurde in deinem Benutzerverzeichnis (
$HOME
) als 'Deine-LIP-Dokumentation.pdf' abegelegt."
return
$RC
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment