Thread: Came back to random numbers and got decent randomness

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    1,734
    Was trying to setup an automated download of the library (for which I can base other project automated downloads off of) but keep getting unexpected end of file error, no matter how many times I check the result is the same as the example I found online, anyone understand what I'm doing wrong here:
    Code:
    BMP_PRJ=hamsternz/my_bmp
    BMP_DIR=my_bmp
    
    RNG_LIB_DIRS:=$(BMP_DIR)
    RNG_LIBS=-l testU01 -l my_bmp
    
    is_dir=if [ -d "$1" ] && $2
    no_dir=if [ ! -d "$1" ] && $2
    mkdir=$(call no_dir,$1,mkdir "$1")
    clone=$(call no_dir,cloned/$1,git --git-dir cloned clone $1 $2)
    pull=git --git-dir cloned/$1 pull
    
    clone:
    	$(call mkdir,cloned)
    	$(call clone,$(BMP_DIR),$(BMP_PRJ))
    	$(call pull,$(BMP_DIR),$(BMP_PRJ))

  2. #2
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    1,734
    *face palms* If there's an easy way to do it and a hard way, I naturally go with hard before noticing the easy:
    Code:
    is_dir=$(if $(wildcard $1 $1/*),$2,$3)
    mkdir=$(call is_dir,$1,echo,mkdir "$1")
    github_pull=cd $(CLONE_DIR)$(call is_dir,$(CLONE_DIR)/$1,/$1 && git pull, && git clone https://github.com/$2.git)
    
    pull:
    	$(call mkdir,cloned)
    	$(call github_pull,$(BMP_DIR),$(BMP_PRJ))

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Scale back size of Numbers while maintaining proportion
    By kerrymaid in forum C Programming
    Replies: 5
    Last Post: 10-23-2011, 01:31 PM
  2. Replies: 4
    Last Post: 11-16-2004, 07:29 AM
  3. Replies: 3
    Last Post: 07-24-2002, 08:46 AM
  4. random number - replaying back.. pls help!
    By Unregistered in forum C++ Programming
    Replies: 7
    Last Post: 01-18-2002, 02:34 AM

Tags for this Thread