Tiny Core Linux
General TC => Programming & Scripting - Unofficial => Topic started by: Sashank999 on July 26, 2020, 10:26:49 PM
-
Hi
I am actually having an error in my script in moving .tcz.list file from /tmp/infocreator to PWD.
Error :
mv: 'python3.6-urwid.tcz.list' and '/tmp/infocreator/python3.6-urwid.tcz.list' are the same file
Code :
PWD=$(pwd)
cp "$FILE".tcz /tmp/infocreator/
cd /tmp/infocreator
unsquashfs "$FILE".tcz &> /dev/null
sudo find ./squashfs-root -not -type d | sed 's,./squashfs-root/,/,' | tee "$FILE".tcz.list &> /dev/null
sudo rm -rf squashfs-root
mv "$FILE".tcz.list "$PWD"/
cd "$PWD"
Any ideas what to do ?
Thanks in advance.
-
Hi Sashank999
Does it work any better if you rename the variable from PWD to OldDir ?
-
Thank You Rich. That worked. This could be marked as solved :D .
-
Hi Sashank999
You are welcome. Next time run:
env
If any of the variables you defined shows up on that list, pick a new name.
-
Thanks for the suggestion.