Update manual deploy
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# This script will add scripts-* to the PATH and the manual to each user's desktop
|
# This script will add scripts-* to the PATH and the manual to each user's desktop
|
||||||
# Copyright 2021 Bryan C. Roessler
|
# Copyright 2021-2023 Bryan C. Roessler
|
||||||
|
|
||||||
parent="${BASH_SOURCE[0]}"
|
parent="${BASH_SOURCE[0]}"
|
||||||
parent=${parent%/*}
|
parent=${parent%/*}
|
||||||
@@ -9,7 +9,7 @@ sourcedir="/home/roessler/shared/hartmanlab"
|
|||||||
original_dir="$PWD"
|
original_dir="$PWD"
|
||||||
|
|
||||||
if [[ "$original_dir" != "$sourcedir" ]]; then
|
if [[ "$original_dir" != "$sourcedir" ]]; then
|
||||||
cd "$sourcedir" || exit $?
|
pushd "$sourcedir" || exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -f functions ]] && . functions || exit 1
|
[[ -f functions ]] && . functions || exit 1
|
||||||
@@ -23,17 +23,26 @@ for script in script-*; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Install manual
|
# Install manual
|
||||||
manual="README.html"
|
# manual=
|
||||||
images_dir="manual-images"
|
# images_dir=
|
||||||
|
|
||||||
[[ ! -f "$manual" ]] && echo "No manual found, skipping!" && exit 1
|
# [[ ! -f "$manual" ]] && echo "No manual found, skipping!" && exit 1
|
||||||
|
remove=("manual.pdf" "manual.odt" "Notes.pdf" "Notes.odt" "README.html" "manual-images" "manual.html" "manual-images")
|
||||||
for homedir in /home/*; do
|
for homedir in /home/*; do
|
||||||
remove=("manual.pdf" "manual.odt" "Notes.pdf" "Notes.odt" "$manual" "$images_dir")
|
desktop="$homedir/Desktop"
|
||||||
|
[[ -d $desktop ]] || continue
|
||||||
for f in "${remove[@]}"; do
|
for f in "${remove[@]}"; do
|
||||||
rm -rf "${homedir}/Desktop/$f"
|
[[ -f $desktop/$f ]] && rm -rf "${desktop:?}/$f"
|
||||||
done
|
done
|
||||||
[[ -d "$homedir/Desktop" ]] && ln -fs "$sourcedir/$manual" "${homedir}/Desktop/manual.html"
|
cat <<-EOF > "$desktop/Link to Manual.desktop"
|
||||||
[[ -d "$homedir/Desktop" ]] && ln -fs "$sourcedir/$images_dir" "${homedir}/Desktop/$images_dir"
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Name=Link to Hartman Lab Server Manual
|
||||||
|
Type=Link
|
||||||
|
URL=https://docs.google.com/document/d/1K_KwAlv8Zljmy-enwmhT6gMTFutlAFglixvpLGBx0VY
|
||||||
|
Icon=text-html
|
||||||
|
EOF
|
||||||
done
|
done
|
||||||
|
unset desktop
|
||||||
|
|
||||||
cd "$original_dir" || exit $?
|
popd || exit $?
|
||||||
|
|||||||
@@ -244,6 +244,7 @@ cat <<- 'EOF' >> "$script"
|
|||||||
Cockpit (graphical admin): http://localhost:9090
|
Cockpit (graphical admin): http://localhost:9090
|
||||||
Robot webcam: http://localhost:8888
|
Robot webcam: http://localhost:8888
|
||||||
Robot computer: vnc://192.168.16.101:5900
|
Robot computer: vnc://192.168.16.101:5900
|
||||||
|
Manual: https://docs.google.com/document/d/1K_KwAlv8Zljmy-enwmhT6gMTFutlAFglixvpLGBx0VY
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Scheduled reboot
|
# Scheduled reboot
|
||||||
|
|||||||
Reference in New Issue
Block a user