Skip to content

Commit 7cdfb82

Browse files
Update setupPackages.sh
1 parent b224392 commit 7cdfb82

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

setupPackages.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,14 @@ cd /home/
156156
for d in */ ; do
157157
TRIMMED=$(basename $d);
158158
echo "Checking $TRIMMED"
159+
TMP=$(id -u $TRIMMED)
159160
sudo mkdir -p /home/$TRIMMED/.arduinoIDE/plugins/
160161
sudo cp $SCRIPT/$EXCEPTION_ZIP /home/$TRIMMED/.arduinoIDE/plugins/
161-
sudo chmod -R 777 /home/$TRIMMED/.arduinoIDE/
162-
echo " sudo chmod -R 777 /home/$TRIMMED/.arduinoIDE/plugins/"
163162
if (! test -d /home/$TRIMMED/.config/cura/) then
164163
echo "Updating cura config for $TRIMMED"
165164
sudo cp -r $SCRIPT/.config/cura/ /home/$TRIMMED/.config/
166165
fi
167-
sudo chmod -R 777 /home/$TRIMMED/.config/
168-
echo " sudo chmod -R 777 /home/$TRIMMED/.config/"
166+
sudo chown -R $TMP:$TMP /home/$TRIMMED/
169167
done
170168

171169
sudo lpadmin -p MDC_LAB -E -v ipp://10.88.5.129/ipp/print -m everywhere

0 commit comments

Comments
 (0)