LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-13-2010, 01:44 PM   #1
myusuf3
LQ Newbie
 
Registered: Jul 2010
Posts: 1

Rep: Reputation: Disabled
Wink copying folder structure with files.


Code:
# creating directories for plugins
mkdir -p ${PLUGINDIR} 
mkdir -p ${BINDIR}
mkdir -p ${TOOLDIR}
mkdir -p ${KDMBUILDWRAPPERS}
mkdir -p ${JRE}
mkdir -p ${GCC}

#copying jar files to PLUGINDIR
for f in $(find ${WORKSPACEDIR} -name "*.jar")
do
cp ${f} ${PLUGINDIR}
done

for c in $(find ${SBINDIR} -name "*.*")
do 
cp ${c} ${BINDIR}
done

for u in $(find ${STOOLDIR} -name "*.*")
do
cp ${u} ${TOOLDIR}
done

for k in $(find ${SKDMBUILDWRAPPERS} -name "*.*")
do 
cp ${k} ${KDMBUILDWRAPPERS}
done

for m in $(find ${SGCCZIP} -name "*.zip")
do
cp ${m} ${GCC}
pushd ${GCC}
unzip *.zip
rm -rf *.zip
popd
done

for n in $(find ${SJREZIP} -name "*.zip")
do cp ${n} ${JRE}
pushd ${JRE}
unzip *.zip
rm -rf *.zip
popd
done

for q in $(find ${SJRE} -name "*.*")
do 
cp ${q} ${JRE}
done

pushd ${JRE}
rm -rf "jre"
popd

for t in $(find ${SGCC} - name "*.*")
do 
cp ${t} ${GCC}
done 

pushd ${GCC}
rm -rf "gcc"
popd

echo "Files copied"


So the problem is with the files i expand from the zip , there is an extra folder that i need to copy content from with its structure.

so instead of /jre/jre/files_want_ it is /jre/files_want

please help

Last edited by myusuf3; 07-13-2010 at 01:54 PM.
 
Old 07-13-2010, 02:20 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Is this actually solved or not? If it's not, take the "tick" away.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copying folder to another withtout overwritting the destinaion files basher400 Linux - General 7 07-19-2009 10:54 AM
Copying Latest Files to Another Folder nformosa Programming 9 04-23-2009 07:40 AM
copying folder and changing extension of files in it? stratotak Linux - Newbie 18 03-10-2009 02:16 AM
Home Jail Folder Structure like Gobolinux Directory Structure luispt Linux - General 3 07-26-2008 07:46 PM
Moving certain files recursively preservice folder structure DigiTalk Linux - Newbie 11 09-08-2005 09:04 AM


All times are GMT -5. The time now is 05:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration