LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-01-2010, 10:38 PM   #1
unclejed613
Member
 
Registered: Mar 2009
Posts: 352

Rep: Reputation: 32
how do i restore lower case filenames in a source code package?


i downloaded a source code package for an old multi-platform game. unfortunately, the author, when he created the .zip archive of the source code, zipped it in DOS, and so all of the file names are in all caps. when i run the configure script, it errors out, not being able to find any of the files (which originally were in lower case.

so, other than the extremely tedious process of renaming each file, one by one, is there any way to fix this so it will build properly? this game was written in 1996, so i don't think i'm the first person to bump into this problem.
 
Old 01-01-2010, 11:05 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
I'm sure some people could do this in a one liner, but here are 3 ugly lines of bash/sed that could work

for f in * ; do
mv $f $(echo $f | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/')
done

Evo2.

Last edited by evo2; 01-01-2010 at 11:05 PM. Reason: typo
 
Old 01-01-2010, 11:57 PM   #3
unclejed613
Member
 
Registered: Mar 2009
Posts: 352

Original Poster
Rep: Reputation: 32
actually i found it... it was in the /unix/readme file:

Code:
How to install the sources from a xxxx.zip file:

1) unzip -La xxxx.zip

   On older 'unzip' use:

   unzip -xa xxxx.zip

   Will create a directory 'fly' with all the stuff underneath. The '-a'
   is needed since it was packed on MSDOS. If you do not have 'unzip'
   then get it, it compiles nicely on most systems.
Ark unzipped it with all uppercase, but when i did it with unzip -La it unzipped correctly with lower case file names
 
Old 01-02-2010, 12:06 AM   #4
unclejed613
Member
 
Registered: Mar 2009
Posts: 352

Original Poster
Rep: Reputation: 32
oh well, won't compile anyway. gcc compiler doesn't recognize a command line argument in the make script

Code:
fly8$ make
gcc -I. -DUNIX -DLINUX -m486 -Wall -O2 -fomit-frame-pointer  -IUNIX              -c need.c
cc1: error: unrecognized command line option "-m486"
make: *** [need.o] Error 1
 
Old 01-02-2010, 01:21 AM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
That flag has been deprecated for about 5 years, try -march=486 instead.

Cheers,

Evo2.
 
Old 01-02-2010, 02:29 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
*

Which game ?
Have you got a link to the application ?
 
Old 01-02-2010, 09:33 AM   #7
unclejed613
Member
 
Registered: Mar 2009
Posts: 352

Original Poster
Rep: Reputation: 32
FLY8 by Eyal Lebidinsky. i originally got it as a DOS game, but he originally wrote it for DEC, then ported it to unix, linux, sparc, dos and windows. i've got the dos and windows versions, which run ok in dosbox and wine (wine seems to have difficulty with the screen colors, but it otherwise works ok). the linux binary refuses to run, so i figured i'd install it from source, but because it was written for an older version of gcc, i'm having problems with it. i'm not really too well versed in C. i once wrote a test pattern program for SVGA monitors, but that was a dos EXE compiled from Basic, and 14 years ago (i'm an analog hardware engineer, not much of a programmer).
http://samba.org/ftp/eyal/fly8/released/index.html
 
1 members found this post helpful.
  


Reply



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
script to list the filenames which are in lower case naveensankineni Programming 2 03-12-2008 07:09 AM
renaming directories from upper case to lower case, help!! linux_teller Linux - Newbie 3 03-07-2008 05:15 AM
Why are all my upper case files being shown as lower case?? [Kernel 2.6.9-1.667 FC3] t3gah Fedora 4 03-11-2005 04:09 PM
Lower case to upper case letter sudhasmyle Programming 1 12-03-2004 04:15 AM
old dump/restore source code jsrini Linux - General 1 06-25-2004 07:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:54 AM.

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
Open Source Consulting | Domain Registration