fixed hooks by using filename, not dirname
This commit is contained in:
parent
299ddaf253
commit
af9e36e14f
6 changed files with 7 additions and 8 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd "$1"
|
cd "$(dirname $1)"
|
||||||
echo "[v] reset log.txt"
|
echo "[v] reset log.txt"
|
||||||
date > log.txt
|
date > log.txt
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd "$1"
|
cd "$(dirname $1)"
|
||||||
echo "[v] scan (new) files of model"
|
echo "[v] scan (new) files of model"
|
||||||
id="$(basename "$dir" | sed 's/\#//g')"
|
id="$(basename "$dir" | sed 's/\#//g')"
|
||||||
#echo "Model.find(id).add_new_files_later()" | /usr/src/app/bin/rails console
|
#echo "Model.find(id).add_new_files_later()" | /usr/src/app/bin/rails console
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
dir="$1"
|
dir="$(dirname $1)"
|
||||||
cd "$dir"
|
cd "$dir"
|
||||||
echo "[package_experience.sh] zipping $dir.zip"
|
echo "[package_experience.sh] zipping $dir.zip"
|
||||||
zip -r "$dir".zip $dir/*
|
zip -r "$dir".zip $dir/*
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
dir="$1"
|
dir="$(dirname $1)"
|
||||||
cd "$dir"
|
cd "$dir"
|
||||||
echo "[package_experience.sh] zipping $dir.zip"
|
echo "[package_experience.sh] zipping $dir.zip"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
dir="$1"
|
dir="$(dirname $1)"
|
||||||
cd "$dir"
|
cd "$dir"
|
||||||
echo "[package_janusxr.sh] packing janusxr.html"
|
echo "[package_janusxr.sh] packing janusxr.html"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,11 @@ require_relative './../../xrforge.rb'
|
||||||
|
|
||||||
# Check if a filename is provided
|
# Check if a filename is provided
|
||||||
if ARGV.length != 1
|
if ARGV.length != 1
|
||||||
puts "Usage: #{$0} <path/to/experience>"
|
puts "Usage: #{$0} <path/to/experience/somefile.xxx>"
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
|
|
||||||
dir = ARGV[0]
|
filename = ARGV[0]
|
||||||
filename = "#{dir}/datapackage.json"
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
# Read and parse the JSON file
|
# Read and parse the JSON file
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue