Skip to content

Commit 4205338

Browse files
committed
Tools: Move pic-* to bin/
Move - `pic-build` - `pic-compile` - `pic-configure` - `pic-create` - `pic-edit` to `bin/`.
1 parent 1f3cc9b commit 4205338

File tree

5 files changed

+25
-17
lines changed

5 files changed

+25
-17
lines changed
File renamed without changes.

pic-compile renamed to bin/pic-compile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@
2222
set -o pipefail
2323
this_dir=$(cd `dirname $0` && pwd)
2424

25+
# PIConGPU prefix path
26+
picongpu_prefix=$(cd $this_dir/.. && pwd)
27+
2528
# load libs and functions ######################################################
2629
#
27-
. $this_dir/buildsystem/CompileSuite/path.sh
28-
. $this_dir/buildsystem/CompileSuite/help.sh
29-
. $this_dir/buildsystem/CompileSuite/color.sh
30-
. $this_dir/buildsystem/CompileSuite/options.sh
31-
. $this_dir/buildsystem/CompileSuite/exec_helper.sh
30+
. $picongpu_prefix/buildsystem/CompileSuite/path.sh
31+
. $picongpu_prefix/buildsystem/CompileSuite/help.sh
32+
. $picongpu_prefix/buildsystem/CompileSuite/color.sh
33+
. $picongpu_prefix/buildsystem/CompileSuite/options.sh
34+
. $picongpu_prefix/buildsystem/CompileSuite/exec_helper.sh
3235

3336
this_dir=`absolute_path $this_dir`
3437

@@ -111,21 +114,21 @@ do
111114
mkdir -p $buildDir
112115

113116
if [ "$num_parallel" -gt "1" ] ; then
114-
$this_dir/buildsystem/CompileSuite/compileSet.sh \
117+
$picongpu_prefix/buildsystem/CompileSuite/compileSet.sh \
115118
"$example_name" "$testFlagNr" "$globalCMakeOptions" \
116119
"$tmpRun_path" "$buildDir" "$examples_path" \
117120
"$quiet_run" &> $buildDir"/compile.log" &
118121

119122
running="`jobs -p | wc -l`"
120-
echo $compileSuite"Spawned $example_name $testFlagNr"
123+
echo $compileSuite"Spawned $example_name $testFlagNr"
121124

122125
while [ "$running" -ge "$num_parallel" ]
123126
do
124127
sleep 5
125128
running="`jobs -p | wc -l`"
126129
done
127130
else
128-
$this_dir/buildsystem/CompileSuite/compileSet.sh \
131+
$picongpu_prefix/buildsystem/CompileSuite/compileSet.sh \
129132
"$example_name" "$testFlagNr" "$globalCMakeOptions" \
130133
"$tmpRun_path" "$buildDir" "$examples_path" \
131134
"$quiet_run" | tee $buildDir"/compile.log" || exit $?

pic-configure renamed to bin/pic-configure

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
this_dir=$(cd $(dirname $0) && pwd)
2323

24+
# PIConGPU prefix path
25+
picongpu_prefix=$(cd $this_dir/.. && pwd)
2426

2527
help()
2628
{
@@ -160,6 +162,6 @@ if [ -z "$alpaka_backend" ] ; then
160162
echo "(Use -b|--backend or export PIC_BACKEND)" >&2
161163
fi
162164

163-
own_command="cmake $cmake_flags $install_path $cmake_extension_param $cmake_options $alpaka_backend $this_dir/include/picongpu"
165+
own_command="cmake $cmake_flags $install_path $cmake_extension_param $cmake_options $alpaka_backend $picongpu_prefix/include/picongpu"
164166
echo -e "\033[32mcmake command:\033[0m $own_command"
165167
eval $own_command

pic-create renamed to bin/pic-create

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
this_dir=$(cd $(dirname $0) && pwd)
2323

24+
# PIConGPU prefix path
25+
picongpu_prefix=$(cd $this_dir/.. && pwd)
2426
# files always cloned from defaults, can be overwritten by input set
2527
default_folder_to_copy="etc/picongpu lib"
2628
# if we clone an input set we copy from it
@@ -68,8 +70,6 @@ done
6870

6971
cmake_path="$*"
7072

71-
default_param_dir="$this_dir"
72-
7373
if [ $# -eq 0 ] || [ $# -gt 2 ] ; then
7474
echo "Missing destination directory or to many directories were given." >&2
7575
exit
@@ -80,7 +80,7 @@ if [ $# -eq 2 ] ; then
8080
dst_path=$2
8181
selected_default_folder_to_copy=$folder_to_clone
8282
else
83-
src_path=$this_dir
83+
src_path=$this_dir/..
8484
dst_path=$1
8585
selected_default_folder_to_copy=$default_folder_to_copy
8686
fi
@@ -126,15 +126,15 @@ fi
126126
for d in $default_folder_to_copy
127127
do
128128
dir_dst="$dst_path/$d"
129-
dir_src="$default_param_dir/$d"
129+
dir_src="$picongpu_prefix/$d"
130130
if [ ! -d "$dir_dst" ] ; then
131131
mkdir -p "$dir_dst"
132132
fi
133133
rsync --inplace -r -q -avc --exclude=".*" $dir_src/ $dir_dst
134134
done
135135

136136
#copy all data from src_path if path is not picongpu default param path
137-
if [ "$src_path" != "$this_dir" ] ; then
137+
if [ "$src_path" != "$picongpu_prefix" ] ; then
138138
for d in $selected_default_folder_to_copy
139139
do
140140
dir_dst="$dst_path/$d"

pic-edit renamed to bin/pic-edit

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,18 @@ this_dir=$(cd $(dirname $0) && pwd)
2323
known_editors=( 'nano' 'vim' 'vi' 'emacs' )
2424
file_prefix="include/picongpu/param"
2525

26+
# PIConGPU prefix path
27+
picongpu_prefix=$(cd $this_dir/.. && pwd)
28+
2629
find_inputs()
2730
{
2831
if [ -d "$file_prefix" ]
2932
then
3033
files_local=$(cd $file_prefix && ls *.param 2>/dev/null)
3134
fi
32-
if [ -d "$this_dir/$file_prefix" ]
35+
if [ -d "$picongpu_prefix/$file_prefix" ]
3336
then
34-
files_defaults=$(cd $this_dir/$file_prefix && ls *.param 2>/dev/null)
37+
files_defaults=$(cd $picongpu_prefix/$file_prefix && ls *.param 2>/dev/null)
3538
fi
3639
# only basename of the files
3740
echo "${files_local//\.param/} ${files_defaults//\.param/}" | sort -u
@@ -136,7 +139,7 @@ do
136139
if [ ! -f "$file_path" ]
137140
then
138141
# if the file is missing, but does exist in the defaults, add it from defaults
139-
defaults_path="$this_dir/$file_prefix/$file_name"
142+
defaults_path="$picongpu_prefix/$file_prefix/$file_name"
140143
if [ -f "$defaults_path" ]
141144
then
142145
cp $defaults_path $file_path

0 commit comments

Comments
 (0)