Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/guile
- -e main -s
- !#
- (if (null? (cdr (program-arguments))) (quit))
- (define locfile (cadr (program-arguments)))
- (if (not (file-exists? locfile)) ((display "No such file.\n") (quit)))
- (define pwd (string-append (getcwd) "/" locfile))
- (define origpwd pwd)
- (define public_html (string-contains pwd "public_html"))
- (if public_html (set! pwd (string-drop pwd (+ 1 public_html (string-length "public_html")))))
- (set! pwd (string-append "http://" pwd))
- (display origpwd)(newline)
- (display pwd)(newline)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement