Skip to content

Commit bac80e5

Browse files
committed
Rename mcm directory to ccc to match toybox/scripts/mkroot.sh.
1 parent ba44f1a commit bac80e5

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

cross.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
#!/bin/bash
22

3-
# Convenience wrapper to set CROSS_COMPILE variable to musl-cross-make pathname
4-
# using "mcm" symlink to musl-cross-make output directory.
3+
# Convenience wrapper to set CROSS_COMPILE variable from short name using "ccc"
4+
# symlink (Cross cc) to directory of cross compilers named $TARGET-*-cross.
5+
# Tested with musl-cross-make output directory.
56

6-
# Usage: ./cross.sh TARGET ./mkroot.sh
7+
# Usage: ./cross.sh TARGET make defconfig toybox_clean root
78
# With no arguments, lists available targets.
89
# Use target "all" to iterate through all targets.
910

10-
MCM="$(dirname "$(readlink -f "$0")")"/mcm
11-
if [ ! -d "$MCM" ]
11+
CCC="$(dirname "$(readlink -f "$0")")"/ccc
12+
if [ ! -d "$CCC" ]
1213
then
13-
echo "Create symlink 'mcm' to musl-cross-make output directory"
14+
echo "Create symlink 'ccc' to cross compiler directory"
1415
exit 1
1516
fi
1617

@@ -19,7 +20,7 @@ unset X Y
1920
# Display target list?
2021
list()
2122
{
22-
ls "$MCM" | sed 's/-.*//' | sort -u | xargs
23+
ls "$CCC" | sed 's/-.*//' | sort -u | xargs
2324
}
2425
[ $# -eq 0 ] && list && exit
2526

@@ -42,7 +43,7 @@ fi
4243

4344
# Call command with CROSS_COMPILE= as its first argument
4445

45-
Y=$(readlink -f "$MCM"/$X-*cross)
46+
Y=$(readlink -f "$CCC"/$X-*cross)
4647
X=$(basename "$Y")
4748
X="$Y/bin/${X/-cross/-}"
4849
[ ! -e "${X}cc" ] && echo "${X}cc not found" && exit 1

0 commit comments

Comments
 (0)