|
Lines 3-9
Link Here
|
| 3 |
# A script to perform R14.0.0 XDG compliance updates. |
3 |
# A script to perform R14.0.0 XDG compliance updates. |
| 4 |
|
4 |
|
| 5 |
SCRIPT_NAME="`basename \`readlink -f $0\``" |
5 |
SCRIPT_NAME="`basename \`readlink -f $0\``" |
| 6 |
SCRIPT_VERSION=201411240 |
6 |
SCRIPT_VERSION=201412080 |
| 7 |
|
7 |
|
| 8 |
# This script should be needed to run only once, but corner cases |
8 |
# This script should be needed to run only once, but corner cases |
| 9 |
# and file/directory permissions could cause incomplete updates. |
9 |
# and file/directory permissions could cause incomplete updates. |
|
Lines 269-283
if [ "$USER_DIR" = "$HOME" ]; then
Link Here
|
| 269 |
fi |
269 |
fi |
| 270 |
fi |
270 |
fi |
| 271 |
|
271 |
|
|
|
272 |
# Get directories for temporary files |
| 273 |
# All three directories are for temporary files. The cache directory is |
| 274 |
# intended for persistent temporary data (is expected to remain across reboots |
| 275 |
# and shutdowns). The other two directories are for non-persistent data and |
| 276 |
# can be deleted across reboots and shutdowns. |
| 277 |
CACHE_DIR="`readlink $PROFILE_DIR/cache-\`uname -n\``" |
| 278 |
SOCKET_DIR="`readlink $PROFILE_DIR/socket-\`uname -n\``" |
| 279 |
TMP_DIR="`readlink $PROFILE_DIR/tmp-\`uname -n\``" |
| 280 |
|
| 272 |
if [ "$R14_VERSION" -lt "201309150" ]; then |
281 |
if [ "$R14_VERSION" -lt "201309150" ]; then |
| 273 |
Log "Updating temp file locations." |
282 |
Log "Updating temp file locations." |
| 274 |
# All three directories are for temporary files. The cache directory is |
|
|
| 275 |
# intended for persistent temporary data (is expected to remain across reboots |
| 276 |
# and shutdowns). The other two directories are for non-persistent data and |
| 277 |
# can be deleted across reboots and shutdowns. |
| 278 |
CACHE_DIR="`readlink $PROFILE_DIR/cache-\`uname -n\``" |
| 279 |
SOCKET_DIR="`readlink $PROFILE_DIR/socket-\`uname -n\``" |
| 280 |
TMP_DIR="`readlink $PROFILE_DIR/tmp-\`uname -n\``" |
| 281 |
# Delete the non-persistent temporary directories. This is safe at any time. |
283 |
# Delete the non-persistent temporary directories. This is safe at any time. |
| 282 |
unlink $PROFILE_DIR/socket-`uname -n` 2>/dev/null |
284 |
unlink $PROFILE_DIR/socket-`uname -n` 2>/dev/null |
| 283 |
unlink $PROFILE_DIR/tmp-`uname -n` 2>/dev/null |
285 |
unlink $PROFILE_DIR/tmp-`uname -n` 2>/dev/null |
|
Lines 317-322
if [ "$R14_VERSION" -lt "201309150" ]; then
Link Here
|
| 317 |
fi |
319 |
fi |
| 318 |
fi |
320 |
fi |
| 319 |
|
321 |
|
|
|
322 |
if [ "$R14_VERSION" -lt "201412080" ]; then |
| 323 |
Log "Updating references of temporary paths." |
| 324 |
# Get base for temporary directories |
| 325 |
if [ "$CACHE_DIR" = "" ]; then |
| 326 |
CACHE_BASE_DIR=/var/tmp |
| 327 |
else |
| 328 |
CACHE_BASE_DIR=`dirname $CACHE_DIR` |
| 329 |
fi |
| 330 |
if [ "$SOCKET_DIR" = "" ]; then |
| 331 |
SOCKET_BASE_DIR=/tmp |
| 332 |
else |
| 333 |
SOCKET_BASE_DIR=`dirname $SOCKET_DIR` |
| 334 |
fi |
| 335 |
if [ "$TMP_DIR" = "" ]; then |
| 336 |
TMP_BASE_DIR=/tmp |
| 337 |
else |
| 338 |
TMP_BASE_DIR=`dirname $TMP_DIR` |
| 339 |
fi |
| 340 |
# Exclude user data files --- we don't want to touch those files. |
| 341 |
find "$PROFILE_DIR" \ |
| 342 |
-path $PROFILE_DIR/share/apps/amarok/albumcovers -prune -o \ |
| 343 |
-path $PROFILE_DIR/share/apps/basket/baskets -prune -o \ |
| 344 |
-path $PROFILE_DIR/share/apps/juk/covers -prune -o \ |
| 345 |
-path $PROFILE_DIR/share/apps/kget/logs -prune -o \ |
| 346 |
-path $PROFILE_DIR/share/apps/kmail/autosave -prune -o \ |
| 347 |
-path $PROFILE_DIR/share/apps/kmail/dimap -prune -o \ |
| 348 |
-path $PROFILE_DIR/share/apps/kmail/imap -prune -o \ |
| 349 |
-path $PROFILE_DIR/share/apps/kmail/mail -prune -o \ |
| 350 |
-path $PROFILE_DIR/share/apps/kmail/search -prune -o \ |
| 351 |
-path $PROFILE_DIR/share/apps/knotes -prune -o \ |
| 352 |
-path $PROFILE_DIR/share/apps/kopete/logs -prune -o \ |
| 353 |
-type f -print0 2>/dev/null | \ |
| 354 |
xargs -r0 grep -ZIEl "($TMP_BASE_DIR/kde|$SOCKET_BASE_DIR/ksocket|$CACHE_BASE_DIR/kde[0-9]*cache)-" | \ |
| 355 |
xargs -r0 sed -ri -e "s|$TMP_BASE_DIR/kde-|$TMP_BASDE_DIR/tde-|g" \ |
| 356 |
-e "s|$SOCKET_BASE_DIR/ksocket-|$SOCKET_BASE_DIR/tdesocket-|g" \ |
| 357 |
-e "s|$CACHE_BASE_DIR/kde[0-9]*cache-|$CACHE_BASE_DIR/tdecache-|g" |
| 358 |
# Cleanup variables |
| 359 |
unset CACHE_BASE_DIR |
| 360 |
unset SOCKET_BASE_DIR |
| 361 |
unset TMP_BASE_DIR |
| 362 |
fi |
| 320 |
if [ "$R14_VERSION" -lt "201309150" ]; then |
363 |
if [ "$R14_VERSION" -lt "201309150" ]; then |
| 321 |
Log "Updating references of $TDEDIR/share/applications/kde to share/applications/tde." |
364 |
Log "Updating references of $TDEDIR/share/applications/kde to share/applications/tde." |
| 322 |
# Exclude KMail mail files --- we don't want to touch those files. |
365 |
# Exclude KMail mail files --- we don't want to touch those files. |