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/
|
||||
if [ -z "$TARGET" ]; then
|
||||
# target unset.
|
||||
TARGET="*.tex"
|
||||
TARGET="$(find /tex -iname '*.tex' | head --lines 1)"
|
||||
fi
|
||||
|
||||
# Build in build dir
|
||||
@ -20,7 +20,7 @@ if test "$(ls -A /tex)"; then
|
||||
echo "$ECHOPREFIX Targetting $TARGET"
|
||||
|
||||
# Build the PDF
|
||||
texi2pdf ../$TARGET
|
||||
texi2pdf $TARGET
|
||||
|
||||
cd ..
|
||||
|
||||
@ -45,9 +45,13 @@ if test "$(ls -A /tex)"; then
|
||||
ln -sf $BUILD ./current-build
|
||||
|
||||
# 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
|
||||
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
|
||||
# Directory is empty
|
||||
echo "$ECHOPREFIX Please mount your directory to /tex"
|
||||
|
Loading…
Reference in New Issue
Block a user