Syntax error: "(" unexpected

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
vstancea
Posts: 15
Joined: 26 Oct 2016, 21:38

Syntax error: "(" unexpected

Post by vstancea »

Made some changes to the AMC file and I keep getting an error.

Code: Select all

vstancea@192-168-0-100:~$ sh Apps/Scripts/filebot.sh
Apps/Scripts/filebot.sh: 14: Apps/Scripts/filebot.sh: Syntax error: "(" unexpected
Here is the script:

Code: Select all

#!/bin/sh -xu

# Input Parameters
ARG_PATH="$TR_TORRENT_DIR/$TR_TORRENT_NAME"
ARG_NAME="$TR_TORRENT_NAME"
ARG_LABEL="N/A"

# Configuration
CONFIG_OUTPUT="/home/vstancea/Media"
CONFIG_INPUT="/home/vstancea/Downloads/Completed/"

export JAVA_OPTS='-Xms256m'
export JAVA_OPTS='-Xmx351m'
sh /home/vstancea//Apps/FileBot/filebot.sh -script dev:amc-universal --output "$CONFIG_OUTPUT" --action move --conflict skip -non-strict "$CONFIG_INPUT" --log-file amc.log --def kodi=192.168.0.100:8080 movieFormat=”/home/vstancea/Media/Movies/{n} ({y})/{fn}” seriesFormat=”/home/vstancea/Media/TV Shows/{n} ({y})/Season {s.pad(2)}/{n} - {s00e00} - {t}” clean=y unsorted=n music=n artwork=n excludeList=".excludes"
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [SOLVED] [armv5tel] QNAP Debian, AMC doesn't do anything (Zero VM, interpreted mode)

Post by rednoah »

Read this:
viewtopic.php?f=4&t=1899


GOOD:

Code: Select all

"..."

BAD:

Code: Select all

”...”

:?: Are you writing code in MS Word? :lol:
:idea: Please read the FAQ and How to Request Help.
vstancea
Posts: 15
Joined: 26 Oct 2016, 21:38

Re: Syntax error: "(" unexpected

Post by vstancea »

Your last remark
:?: Are you writing code in MS Word? :lol:
made me look closer into the code and the error was because of
"..."
After correcting it, it worked.

I also wanted to try

Code: Select all

dev:amc-universal
which you suggested in an earlier post, but it gave the error bellow:

Code: Select all

vstancea@192-168-0-100:~$ sh Apps/Scripts/filebot.sh 
Locking /home/vstancea/Apps/Filebot/data/logs/amc.log
Run script [dev:amc-universal] at [Sun Feb 17 15:08:24 EET 2019]
Parameter: kodi = *****
Parameter: movieFormat = /home/vstancea/Media/Movies/{n} ({y})/{fn}
Parameter: seriesFormat = /home/vstancea/Media/TV Shows/{n} ({y})/Season {s.pad(2)}/{n} - {s00e00} - {t}
Parameter: clean = y
Parameter: unsorted = n
Parameter: music = n
Parameter: artwork = n
Parameter: excludeList = .excludes
Argument[0]: /home/vstancea/Downloads/Complete
No such property: license for class: Script1
groovy.lang.MissingPropertyException: No such property: license for class: Script1
	at Script1.run(Script1.groovy:14)
	at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:64)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:119)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
	at net.filebot.Main.main(Main.java:115)

Failure (°_°)
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Syntax error: "(" unexpected

Post by rednoah »

The new amc rewrite requires FileBot 4.8.5 which is currently in beta:
viewtopic.php?f=6&t=9535
:idea: Please read the FAQ and How to Request Help.
vstancea
Posts: 15
Joined: 26 Oct 2016, 21:38

Re: Syntax error: "(" unexpected

Post by vstancea »

Since I'm using a lower end architecture, which would require a Oracle Java SE Embedded, which is only at version 8, i'm stuck with Filebot 4.7.9.

But i would like to thank you a lot for you help, you are awesome. I just hope that you'll keep the old amc alive for the rest of us.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Syntax error: "(" unexpected

Post by rednoah »

vstancea wrote: 17 Feb 2019, 13:37 Since I'm using a lower end architecture, which would require a Oracle Java SE Embedded, which is only at version 8, i'm stuck with Filebot 4.7.9.
Packages for embedded Linux devices are built for Java 8 so you can upgrade to FileBot 4.8.2 or FileBot 4.8.5 just fine:

Code: Select all

*-aur.tar.xz
*-portable.tar.xz
*_universal-jdk8.deb
*.spk
*.qpkg
:idea: Please read the FAQ and How to Request Help.
vstancea
Posts: 15
Joined: 26 Oct 2016, 21:38

Re: Syntax error: "(" unexpected

Post by vstancea »

Currently I'm using Filebot 4.7.9 Portable. So I can just download 4.8.2 or even 4.8.5 and it will work with Oracle Java SE Embedded, ver 8 and it will work? Please keep in mind that i'm using a ARMv5 architecture

Code: Select all

uname: Linux 192-168-0-100 4.9.0-8-marvell #1 Debian 4.9.130-2 (2018-10-27) armv5tel GNU/Linux
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Syntax error: "(" unexpected

Post by rednoah »

FileBot itself will work just fine. But not sure about dependencies. Just run sysinfo and see what is and isn't working.
:idea: Please read the FAQ and How to Request Help.
Post Reply