Skip to content

Commit

Permalink
rfs/clear.sh notes
Browse files Browse the repository at this point in the history
  • Loading branch information
huapox committed Oct 30, 2024
1 parent 2c43433 commit 03c337f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rootfs/src/static/clear/clear.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash
cur=$(cd "$(dirname "$0")"; pwd)

# clear
# clear ###########################################
cat $cur/usr-local-static-dir.txt |grep -Ev "^#|^$" |while read one; do
rm -rf /rootfs/$one
done
cat $cur/*file*.txt |grep -Ev "^#|^$" |while read one; do
rm -f /rootfs/$one
done

# upx
# upx ###########################################
ln -s /rootfs/usr/local/static/3rd/bin/upx /bin/upx
upx -V
# root@tenvm2:/usr/local/static/3rd# tree -h
Expand All @@ -28,7 +28,7 @@ find /rootfs/usr/local/static -type f |grep -E "/sbin/|/bin/" |grep -v "/3rd/bin
du -sh $one
done

# link-bin,sbin
# link-bin,sbin ###########################################
rm -rf /rootfs/usr/bin /rootfs/usr/sbin; mkdir -p /rootfs/usr/bin /rootfs/usr/sbin;

# clear-xrdp;
Expand All @@ -43,7 +43,7 @@ done
find /rootfs/usr/local/static -type f |grep "/bin/" |sort | \
while read one; do ls -lh $one; one2=$(echo $one|sed "s^/rootfs^^g"); ln -s $one2 /rootfs/usr/bin/; done;

# link-openbox-theme
# link-openbox-theme ###########################################
find /rootfs/usr/local/static/openbox/share/ -type d |grep openbox-3 |while read one; do
one=$(echo $one |sed "s^/rootfs^^g");
dst=$(echo $one |sed "s^local/static/openbox/^^g");
Expand Down

0 comments on commit 03c337f

Please sign in to comment.