Skip to content

Commit 045e9a9

Browse files
committed
opt. install functions, always get latest vscode
1 parent fb2c951 commit 045e9a9

File tree

34 files changed

+461
-2006
lines changed

34 files changed

+461
-2006
lines changed

install

Lines changed: 394 additions & 77 deletions
Large diffs are not rendered by default.

link_rename.sh

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,30 @@
1-
#! /bin/bash
1+
#!/bin/bash
22

33
DIR=$1
44
OLD_PATTERN=$2
55
NEW_PATTERN=$3
66

7-
while read -r line
8-
do
9-
echo $line
7+
find "$DIR" -type l | while read -r line; do
8+
echo "Processing: $line"
109
CUR_LINK_PATH="$(readlink "$line")"
11-
NEW_LINK_PATH="$CUR_LINK_PATH"
12-
NEW_LINK_PATH="${NEW_LINK_PATH/"$OLD_PATTERN"/"$NEW_PATTERN"}"
13-
rm "$line"
14-
ln -s "$NEW_LINK_PATH" "$line"
15-
done <<< $(find "$DIR" -type l)
10+
if [ -z "$CUR_LINK_PATH" ]; then
11+
echo "Error: Unable to read link target for $line"
12+
continue
13+
fi
14+
NEW_LINK_PATH="${CUR_LINK_PATH/$OLD_PATTERN/$NEW_PATTERN}"
15+
if [ "$CUR_LINK_PATH" != "$NEW_LINK_PATH" ]; then
16+
rm "$line"
17+
if [ $? -ne 0 ]; then
18+
echo "Error: Failed to remove $line"
19+
continue
20+
fi
21+
ln -s "$NEW_LINK_PATH" "$line"
22+
if [ $? -ne 0 ]; then
23+
echo "Error: Failed to create symbolic link $line -> $NEW_LINK_PATH"
24+
continue
25+
fi
26+
echo "Updated: $line -> $NEW_LINK_PATH"
27+
else
28+
echo "No change needed for: $line"
29+
fi
30+
done

src/etc/init.d/php7.4xdbg-fpm

Lines changed: 0 additions & 163 deletions
This file was deleted.

src/etc/init.d/php8.0xdbg-fpm

Lines changed: 0 additions & 163 deletions
This file was deleted.

0 commit comments

Comments
 (0)