Bash script to rsync plugins adds ? to end of file extension

Discussion in 'Systems Administration' started by ssamjh, May 16, 2016.

Thread Status:
Not open for further replies.
  1. ssamjh

    Moderator

    Hey there guys, I am trying to make an automated system that copies the latest jar file from a directory on my server on each restart. Meaning I only have to update one jar each time a plugin updated.

    I used to use simlinks but it meant I ran into some issues. So I wanted to move to this.
    I have also tried using cp instead of rsync - same issue. I also have tried specifying the full output folder, same issue.

    OS is Ubuntu 14.04 64bit.

    EDIT: Just found out all the jars except WorldGuard have a '?' on the end of them that my file transfer client doesn't show.

    You can see the script here https://paste.ssamjh.net/view/raw/f4c75764

    When I use that script all the files appear to be invalid as shown here (and the error when I try to open/download a jar)
    [​IMG]

    But when I run the contents of that script file in my console with putty it works fine like this
    [​IMG]


    There is no errors in the console and I run the script using
    Code (Text):
    bash plugins.sh
     
    #1 ssamjh, May 16, 2016
    Last edited: May 16, 2016
  2. Adding ? at the end of the files might be a glitch with nano. Use vim or install dos2unix and use it on the script.
     
  3. ssamjh

    Moderator

    Got it working, thanks for the help.
    (was discussed more on discord)
     
  4. ssamjh

    Moderator

Thread Status:
Not open for further replies.