Fix access rights of result
This commit is contained in:
parent
f4b54637aa
commit
8d51a85454
12
run.sh
12
run.sh
@ -9,7 +9,7 @@ if test "$(ls -A /tex)"; then
|
|||||||
# Directory not empty - user mounted directory \o/
|
# Directory not empty - user mounted directory \o/
|
||||||
if [ -z "$TARGET" ]; then
|
if [ -z "$TARGET" ]; then
|
||||||
# target unset.
|
# target unset.
|
||||||
TARGET="*.tex"
|
TARGET="$(find /tex -iname '*.tex' | head --lines 1)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build in build dir
|
# Build in build dir
|
||||||
@ -20,7 +20,7 @@ if test "$(ls -A /tex)"; then
|
|||||||
echo "$ECHOPREFIX Targetting $TARGET"
|
echo "$ECHOPREFIX Targetting $TARGET"
|
||||||
|
|
||||||
# Build the PDF
|
# Build the PDF
|
||||||
texi2pdf ../$TARGET
|
texi2pdf $TARGET
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
@ -45,9 +45,13 @@ if test "$(ls -A /tex)"; then
|
|||||||
ln -sf $BUILD ./current-build
|
ln -sf $BUILD ./current-build
|
||||||
|
|
||||||
# Apply the access rights to build folder as found on the target file
|
# Apply the access rights to build folder as found on the target file
|
||||||
chmod --reference=$TARGET -R $BUILD ./current-build ./last-successful ./last-failed
|
chmod --silent --reference=$TARGET -R $BUILD ./current-build
|
||||||
|
chmod --silent --reference=$TARGET -R $BUILD ./last-successful
|
||||||
|
chmod --silent --reference=$TARGET -R $BUILD ./last-failed
|
||||||
chmod +x $BUILD
|
chmod +x $BUILD
|
||||||
chown --reference=$TARGET -R $BUILD ./current-build ./last-successful ./last-failed
|
chown --silent --reference=$TARGET -R $BUILD ./current-build
|
||||||
|
chown --silent --reference=$TARGET -R $BUILD ./last-successful
|
||||||
|
chown --silent --reference=$TARGET -R $BUILD ./last-failed
|
||||||
else
|
else
|
||||||
# Directory is empty
|
# Directory is empty
|
||||||
echo "$ECHOPREFIX Please mount your directory to /tex"
|
echo "$ECHOPREFIX Please mount your directory to /tex"
|
||||||
|
Loading…
Reference in New Issue
Block a user