• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • AudioLink
  • Mailing Lists

[AudioLink-cvs]audiolink/code alfilldb,1.30,1.31

Status: Alpha
Brought to you by: amitshah
  • Summary
  • Files
  • Reviews
  • Support
  • Mailing Lists
  • Bugs
  • News
  • Git
  • CVS
Menu ▾ ▴
  • audiolink-cvs

[AudioLink-cvs]audiolink/code alfilldb,1.30,1.31

[AudioLink-cvs]audiolink/code alfilldb,1.30,1.31
From: <ami...@us...> - 2003-12-05 12:24:06
Update of /cvsroot/audiolink/audiolink/code
In directory sc8-pr-cvs1:/tmp/cvs-serv4484

Modified Files:
	alfilldb 
Log Message:
1. config file isn't perl code now; simple "a = b" stuff
2. command-line args override config file options


Index: alfilldb
===================================================================
RCS file: /cvsroot/audiolink/audiolink/code/alfilldb,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** alfilldb	4 Dec 2003 16:11:59 -0000	1.30
--- alfilldb	5 Dec 2003 12:24:03 -0000	1.31
***************
*** 406,415 ****
  
  # execution starts here
- $config_file = "$ENV{HOME}/.audiolink/config";
- 
- unless (do $config_file) {
-     warn "WARNING: Couldn't parse the config file, $config_file: $@" if $@;
-     warn "WARNING: Couldn't read the config file, $config_file: $!";
- }
  
  # check for command-line arguments
--- 406,409 ----
***************
*** 468,471 ****
--- 462,484 ----
  } else { # no option specified, default to add and update
      $addmode = $updmode = 1;
+ }
+ 
+ $config_file = "$ENV{HOME}/.audiolink/config";
+ 
+ if (-e $config_file) {
+     open(CONFFILE, $config_file);
+ 
+     # go through the config file
+     while (<CONFFILE>) {
+ 	if (/^\s*user\s*\=+\s*(\w+)/) {
+ 	    chomp($user = $1) unless $user;
+ 	} elsif ( /^\s*pass(word)?\s*=\s*(\w+)/) {
+ 	    chomp($password = $2) unless $password;
+ 	} elsif ( /^\s*host\s*=\s*(\w+)/) {
+ 	    chomp($host = $1) unless $host;
+ 	}
+     }
+ } else {
+     warn "WARNING: config file not found. Use the audiolink script to create one.\n";
  }
  





View entire thread

SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    1320 Columbia Street Suite 310
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2025 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
×
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
✔
✘
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL: