mirror of https://github.com/tteck/Proxmox.git
				
				
				
			fix: else if > elif
This commit is contained in:
		
							parent
							
								
									0599e21e3e
								
							
						
					
					
						commit
						99ecfc0734
					
				
							
								
								
									
										14
									
								
								misc/fs.func
								
								
								
								
							
							
						
						
									
										14
									
								
								misc/fs.func
								
								
								
								
							| 
						 | 
					@ -10,16 +10,16 @@ if [ "$FS_LOCAL_ROOT" != "" ]; then FS_SOURCE=local; fi;
 | 
				
			||||||
# This function prints a file from the repositories root. When running PHS locally, it uses the file system, otherwise it points to the latest main branch.
 | 
					# This function prints a file from the repositories root. When running PHS locally, it uses the file system, otherwise it points to the latest main branch.
 | 
				
			||||||
fs_cat() {
 | 
					fs_cat() {
 | 
				
			||||||
    if [ "$FS_SOURCE" == "local" ]; then
 | 
					    if [ "$FS_SOURCE" == "local" ]; then
 | 
				
			||||||
        FILE_PATH="${FS_LOCAL_ROOT}/$1"
 | 
					        FILE_PATH="${FS_LOCAL_ROOT}/$1";
 | 
				
			||||||
        if [ -f "$FILE_PATH" ]; then
 | 
					        if [ -f "$FILE_PATH" ]; then
 | 
				
			||||||
            cat "$FILE_PATH";
 | 
					            cat "$FILE_PATH";
 | 
				
			||||||
        fi;
 | 
					        fi;
 | 
				
			||||||
    else if [ "$FS_SOURCE" == "remote" ]; then
 | 
					    elif [ "$FS_SOURCE" == "remote" ]; then
 | 
				
			||||||
        curl -s "https://raw.githubusercontent.com/tteck/Proxmox/${FS_REMOTE_BRANCH}/$1";
 | 
					        curl -s "https://raw.githubusercontent.com/tteck/Proxmox/${FS_REMOTE_BRANCH}/$1";
 | 
				
			||||||
    fi;
 | 
					    fi;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    msg_error "Something went wrong while attempting to cat file: $1."
 | 
					    msg_error "Something went wrong while attempting to cat file: $1.";
 | 
				
			||||||
    echo -e "\nExiting..."
 | 
					    echo -e "\nExiting...";
 | 
				
			||||||
    sleep 2
 | 
					    sleep 2;
 | 
				
			||||||
    exit
 | 
					    exit;
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue